Repository navigation
JsonNode options - #41030
JsonNode options#41030
Conversation
ahsonkhan
left a comment
There was a problem hiding this comment.
Other than validating DuplicatePropertyNameHandlingStrategy in JsonNodeOptions and adding tests for out-of-range enum values, looks good.
|
I think it's ready to be merged. |
| readonly get => _duplicatePropertyNameHandlingStrategy; | ||
| set | ||
| { | ||
| if ((uint)value > (uint)DuplicatePropertyNameHandlingStrategy.Error) |
There was a problem hiding this comment.
We should add tests for invalid DuplicatePropertyNameHandling enum values but this can be addressed separately as its test enhancement to improve coverage.
See #41030 (comment)
Someone could pass in -1 for this OR an integer value larger than
DuplicatePropertyNameHandlingStrategy.Error.
There was a problem hiding this comment.
|
Is any of this functionality planned to be included in 3.0, or only 5.0? |
|
This is planned for 5.0. 3.0 GA'd already. |
|
I guess I meant available as functionality via a nuget before GA of 5.0. I understand 3.0 GA'd already. |
|
You can try out the nightly alpha builds of 5.0 which are built out of the master branch. The |
* JsonNodeOptions added * review comments included * review comments included Commit migrated from dotnet/corefx@5bc2806
I changed
JsonNode.Parseto useJsonNodeOptionsinstead ofJsonDocumentOptions.cc: @ahsonkhan @terrajobst