Skip to content
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

JsonSerializer improvements in .NET 5 #41313

Closed
layomia opened this issue Aug 25, 2020 · 5 comments
Closed

JsonSerializer improvements in .NET 5 #41313

layomia opened this issue Aug 25, 2020 · 5 comments
Labels
area-System.Text.Json Epic Groups multiple user stories. Can be grouped under a theme.
Milestone

Comments

@layomia
Copy link
Contributor

layomia commented Aug 25, 2020

In 5.0, we have added new features to JsonSerializer, improved performance and reliability, and made the serializer work on more platforms. This list goes over the most user-facing improvements.

Issue Description Category
#30820 Add mechanism to preserve object references when (de)serializing Feature
#32937 Add extension methods for HttpClient that allow (de)serializing JSON Feature
#30255 Support (de)serializing quoted numbers Feature
#29895 Support deserializing objects using parameterized constructors Feature
#876 Support (de)serializing fields Feature
#779 Support ignoring value-type defaults Feature
#30687 Support conditionally ignoring properties (always, never, when null/default) Feature
#30524 Support non-string dictionary keys Feature
#29743 Allow using non-public property accessors for (de)serialization Feature
#34439 Provide opt-in for custom converters to handle null Feature
#38539 Support new C# record types Feature
#30445 Add a copy constructor to JsonSerializerOptions Feature
#34626 Add constructor to JsonSerializerOptions that takes serialization defaults Feature
#2259 Improve (de)serialization performance for collections Performance
#36635 Improve serialization performance for small or value-type POCOS (TechEmpower) Performance
#35848 Improve deserialization perf for case-insensitive and missing-property cases Performance
dotnet/corefx#41845 Improve perf for serializing long JSON strings Performance
#31326 Enable JsonSerializer to work on Xamarin iOS/Android Platform support

Check out demos for the new features: https://github.com/layomia/NET5JsonDemos.

@layomia layomia added Epic Groups multiple user stories. Can be grouped under a theme. area-System.Text.Json labels Aug 25, 2020
@layomia layomia added this to the Future milestone Aug 25, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Aug 25, 2020
@layomia layomia removed the untriaged New issue has not been triaged by the area owner label Aug 25, 2020
@Joelius300
Copy link

I'm guessing this list is complete and there won't be any other features added to the serializer until after .NET 5.0 is released, is that correct?

@layomia
Copy link
Contributor Author

layomia commented Sep 13, 2020

@Joelius300 yes, this list is complete. No other features will be added until after .NET 5.0 is released.

@TonyValenti
Copy link

With Records now part of C#, I think that the next release should include serialization/Deserialization for the immutable collections. I feel incomplete without it.

@layomia
Copy link
Contributor Author

layomia commented Oct 22, 2020

@TonyValenti - do you mean collections in System.Collections.Immutable (already supported), or generally probing for constructors that take IEnumerable<T>, T[], IEnumerable<KeyValuePair<TKey, TValue>>, etc.? Please feel free to open an issue describing your scenario.

@layomia
Copy link
Contributor Author

layomia commented Oct 22, 2020

Closing this issue as the feature work for System.Text.Json in 5.0 is complete.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Text.Json Epic Groups multiple user stories. Can be grouped under a theme.
Projects
None yet
Development

No branches or pull requests

4 participants