-
Notifications
You must be signed in to change notification settings - Fork 14
Add nested json output for protectionscan #391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add nested json output for protectionscan #391
Conversation
|
With regards to the |
Co-authored-by: Matt Nadareski <mnadareski@outlook.com>
|
I'm not sure either, but considering it's something that seems to explicitly be handled by various different json programs, I'm worried that actually printing a plus might break several programs since it's not intended. I wouldn't know, though. |
| Dictionary<string, object> node = (Dictionary<string, object>)modifyNodeList[i].Item1; | ||
|
|
||
| // Copy the existing KVPs out so they won't be lost | ||
| var copyDictionary = new Dictionary<string, object>((Dictionary<string, object>)node[part]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copies the existing KVPs out so they won't be lost
| node[part] = new List<object>(); | ||
| List<object> modifyNode = (List<object>)node[part]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redefines node that needs to be modified to a list of objects
| List<object> modifyNode = (List<object>)node[part]; | ||
|
|
||
| // Add the "root" protection | ||
| modifyNode.Add(nodeProtections); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the "root" protections

There is one thing I'd like your advice on, if you have any. I thought i was having encoding issues, as the plus sign was turning into
\u002B, but it turns out this specific character is supposed to be treated this way.dotnet/runtime#35281
Should I
\u002Bwith+on the outputI'm not sure what's best, since apparently
So, doing some kind of workaround doesn't seem ideal.