Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

JsonNode options - #41030

Merged
ahsonkhan merged 4 commits into
dotnet:masterfrom
kasiabulat:kasiabulat/json-node-options
Sep 20, 2019
Merged

ahsonkhan merged 4 commits into
dotnet:masterfrom
kasiabulat:kasiabulat/json-node-options

Conversation

@kasiabulat

Copy link
Copy Markdown
Contributor

I changed JsonNode.Parse to use JsonNodeOptions instead of JsonDocumentOptions.
cc: @ahsonkhan @terrajobst

@ahsonkhan ahsonkhan added this to the 5.0 milestone Sep 11, 2019

@ahsonkhan ahsonkhan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than validating DuplicatePropertyNameHandlingStrategy in JsonNodeOptions and adding tests for out-of-range enum values, looks good.

@kasiabulat

Copy link
Copy Markdown
Contributor Author

I think it's ready to be merged.

@kasiabulat kasiabulat mentioned this pull request Sep 19, 2019
readonly get => _duplicatePropertyNameHandlingStrategy;
set
{
if ((uint)value > (uint)DuplicatePropertyNameHandlingStrategy.Error)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ahsonkhan
ahsonkhan merged commit 5bc2806 into dotnet:master Sep 20, 2019
@LoganGirard

Copy link
Copy Markdown

Is any of this functionality planned to be included in 3.0, or only 5.0?

@ahsonkhan

Copy link
Copy Markdown

This is planned for 5.0. 3.0 GA'd already.

@LoganGirard

Copy link
Copy Markdown

I guess I meant available as functionality via a nuget before GA of 5.0. I understand 3.0 GA'd already.

@ahsonkhan

Copy link
Copy Markdown

You can try out the nightly alpha builds of 5.0 which are built out of the master branch.
https://github.com/dotnet/core-setup#daily-builds

The JsonNode types are available in-box (as part of the shared framework/SDK) and also available as a standalone System.Text.Json NuGet package if you add this feed (where we publish the daily built packages):
https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json

See https://github.com/dotnet/corefx/#daily-builds

picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
* JsonNodeOptions added

* review comments included

* review comments included


Commit migrated from dotnet/corefx@5bc2806
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants