-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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 JsonSerializerOptions.Default #61434
Add JsonSerializerOptions.Default #61434
Conversation
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
Tagging subscribers to this area: @dotnet/area-system-text-json Issue DetailsFix #61093.
|
src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/OptionsTests.cs
Outdated
Show resolved
Hide resolved
/// Gets a read-only, singleton instance of <see cref="JsonSerializerOptions" /> that uses the default configuration. | ||
/// </summary> | ||
/// <remarks> | ||
/// Each <see cref="JsonSerializerOptions" /> instance encapsulates its own converter cache, |
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.
I don't think we need to be specific on "converter cache". Just "caches". It's not just converters, all of the JsonTypeInfo info is cached (properties, constructors, converters).
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.
Changed, although one could argue that JsonTypeInfo is just implementation detail for object converters. But I agree it should best be kept vague.
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.
Misc comment on doc, otherwise LGTM
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.
Some style suggestions, but LGTM 😄 👍🏼
Good work!
src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/OptionsTests.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/OptionsTests.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/OptionsTests.cs
Show resolved
Hide resolved
ac06d13
to
d0e1b13
Compare
Fix #61093.