-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Root built-in converters in JsonSerializerOptions.GetConverter(Type) #51897
Conversation
Tagging subscribers to this area: @eiriktsarpalis, @layomia Issue DetailsThe JSON source generator does not generate calls to this method, so we don't need to make a breaking change. In this PR, we restore backwards-compat by rooting built-in converters. We can provide a new size-friendly API if the scenario comes up.
|
src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/OptionsTests.cs
Outdated
Show resolved
Hide resolved
...s/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/JsonSourceGeneratorTests.cs
Show resolved
Hide resolved
a059c30
to
fa79d9f
Compare
Hello @layomia! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
@eerhardt, @steveharter, @eiriktsarpalis - PTAL commit 8afd77e which marks |
...ries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.Converters.cs
Outdated
Show resolved
Hide resolved
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.
Looks fine to me.
The JSON source generator does not generate calls to this method, so we don't need to make a breaking change. In this PR, we restore backwards-compat by rooting built-in converters. We can provide a new size-friendly API if the scenario comes up.