-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add JsonNumberHandling(Attribute) & support for (de)serializing numbers from/to string #39363
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
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. |
src/libraries/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.TryGet.cs
Outdated
Show resolved
Hide resolved
bfb01c9 to
29d317f
Compare
...aries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/Int64Converter.cs
Outdated
Show resolved
Hide resolved
...raries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/ByteConverter.cs
Outdated
Show resolved
Hide resolved
...raries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/ByteConverter.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteValues.String.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Serialization/NumberHandlingTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Serialization/NumberHandlingTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Serialization/NumberHandlingTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Serialization/NumberHandlingTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Serialization/NumberHandlingTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Serialization/NumberHandlingTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Serialization/NumberHandlingTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Serialization/NumberHandlingTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Serialization/NumberHandlingTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonNumberHandling.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/src/System/Text/Json/Reader/JsonReaderHelper.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.TryGet.cs
Outdated
Show resolved
Hide resolved
...raries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/ByteConverter.cs
Outdated
Show resolved
Hide resolved
51b8044 to
3b90de7
Compare
src/libraries/System.Text.Json/tests/Serialization/NumberHandlingTests.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Serialization/NumberHandlingTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Serialization/NumberHandlingTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Serialization/NumberHandlingTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Serialization/NumberHandlingTests.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Serialization/NumberHandlingTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Serialization/NumberHandlingTests.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Serialization/NumberHandlingTests.cs
Outdated
Show resolved
Hide resolved
steveharter
left a comment
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.
From other pending changes per offline review, LGTM.
|
Barring benchmark noise, there are no noticeable perf regressions caused by this PR:
|
src/libraries/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.TryGet.cs
Show resolved
Hide resolved
.../System.Text.Json/src/System/Text/Json/Serialization/Converters/Collection/IListConverter.cs
Show resolved
Hide resolved
...ystem.Text.Json/src/System/Text/Json/Serialization/Attributes/JsonNumberHandlingAttribute.cs
Show resolved
Hide resolved
...ystem.Text.Json/src/System/Text/Json/Serialization/Attributes/JsonNumberHandlingAttribute.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonNumberHandling.cs
Show resolved
Hide resolved
...libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Helpers.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Serialization/NumberHandlingTests.cs
Outdated
Show resolved
Hide resolved
…rs from/to string (dotnet#39363) * Add JsonNumberHandling & support for (de)serializing numbers from/to string * Add JsonNumberHandlingAttribute * Address review feedback + fixups * Address review feedback ii
Fixes #30255.