-
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
Populating JSON properties support #83669
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, @gregsdennis Issue DetailsFixes: #78556 I have some minor TODOs left related to tests which I plan to address to create issues for as part of this PR:
Implements plumbing for populating objects (without root level APIs). This adds lots of end to end test cases for collections, dictionaries and objects. They all cycle between testing fields, number handling and various different knobs. There are also 2 test cases which test all possible metadata knobs with combination of property which can or cannot be populated. All implementation detail specs are described in the main issue.
|
...tem.Text.Json/src/System/Text/Json/Serialization/Converters/Object/ObjectDefaultConverter.cs
Show resolved
Hide resolved
...tem.Text.Json/tests/System.Text.Json.Tests/Serialization/JsonCreationHandlingTests.Object.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/Common/JsonObjectCreationHandling.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/gen/JsonSourceGenerator.Emitter.cs
Outdated
Show resolved
Hide resolved
...xt.Json/src/System/Text/Json/Serialization/Attributes/JsonObjectCreationHandlingAttribute.cs
Outdated
Show resolved
Hide resolved
...xt.Json/src/System/Text/Json/Serialization/Attributes/JsonObjectCreationHandlingAttribute.cs
Outdated
Show resolved
Hide resolved
...xt.Json/src/System/Text/Json/Serialization/Attributes/JsonObjectCreationHandlingAttribute.cs
Outdated
Show resolved
Hide resolved
...xt.Json/src/System/Text/Json/Serialization/Attributes/JsonObjectCreationHandlingAttribute.cs
Outdated
Show resolved
Hide resolved
...xt.Json/src/System/Text/Json/Serialization/Attributes/JsonObjectCreationHandlingAttribute.cs
Outdated
Show resolved
Hide resolved
...xt.Json/src/System/Text/Json/Serialization/Attributes/JsonObjectCreationHandlingAttribute.cs
Outdated
Show resolved
Hide resolved
...tem/Text/Json/Serialization/Converters/Object/ObjectWithParameterizedConstructorConverter.cs
Outdated
Show resolved
Hide resolved
...tem/Text/Json/Serialization/Converters/Object/ObjectWithParameterizedConstructorConverter.cs
Outdated
Show resolved
Hide resolved
...tem/Text/Json/Serialization/Converters/Object/ObjectWithParameterizedConstructorConverter.cs
Outdated
Show resolved
Hide resolved
...es/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/NullableConverter.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonTypeInfo.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonPropertyInfo.cs
Outdated
Show resolved
Hide resolved
Grep for Slower/Faster in the benchmarks results folder. Slower
Faster
|
/benchmark microbenchmarks aspnet-perf-win libs --variable filter="System.Text.Json.Tests*" |
Benchmark started for microbenchmarks on aspnet-perf-win with libs and arguments |
...em.Text.Json/tests/System.Text.Json.Tests/Serialization/JsonCreationHandlingTests.Generic.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonPropertyInfo.cs
Show resolved
Hide resolved
...em.Text.Json/tests/System.Text.Json.Tests/Serialization/JsonCreationHandlingTests.Generic.cs
Outdated
Show resolved
Hide resolved
34d9f1d
to
1cb3f3f
Compare
...xt.Json/src/System/Text/Json/Serialization/Attributes/JsonObjectCreationHandlingAttribute.cs
Show resolved
Hide resolved
…extend unit testing for the new metadata APIs.
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.
LGTM. Great work overall 👍
Although not a big and clear regression, could you look at regressions in |
The |
Fixes: #78556
For all samples below following options are used (also added in this PR):
APIs added in this PR
I have some minor TODOs left related to tests which I plan to address separately:
.Objects
test file - last test case)