-
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
Add JsonPropertyDictionary and associated refactoring #53206
Add JsonPropertyDictionary and associated refactoring #53206
Conversation
Tagging subscribers to this area: @eiriktsarpalis, @layomia Issue DetailsCombines property creation and access logic from three locations:
The code now shared:
This code is expected to be used shortly by a more extensible POCO hooks where the property list is exposed. No known performance serialization CPU or alloc regressions; benchmarks show +- 1%, perhaps a bit on the faster side now due to other misc optimizations including avoiding a couple "if" statements per property during serialization.
|
69f0037
to
8bcc982
Compare
src/libraries/System.Text.Json/src/System/Text/Json/JsonPropertyDictionary.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/src/System/Text/Json/JsonPropertyDictionary.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/src/System/Text/Json/Nodes/JsonObject.IDictionary.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/src/System/Text/Json/Nodes/JsonObject.IDictionary.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/src/System/Text/Json/Nodes/JsonObject.IDictionary.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonTypeInfo.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonTypeInfo.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonTypeInfo.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonTypeInfo.cs
Outdated
Show resolved
Hide resolved
...libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonTypeInfo.Cache.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/src/System/Text/Json/JsonPropertyDictionary.cs
Outdated
Show resolved
Hide resolved
31257d5
to
76bee85
Compare
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
Combines property creation and access logic from three locations:
The code now shared:
This code is expected to be used shortly by a more extensible POCO hooks where the property list is exposed.
No known performance serialization CPU or alloc regressions; benchmarks show +- 1%, perhaps a bit on the faster side now due to other misc optimizations including avoiding a couple "if" statements per property during serialization.