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

Switch default built-in serializer to System.Text.Json #31

Merged
merged 1 commit into from
Jun 14, 2021
Merged

Switch default built-in serializer to System.Text.Json #31

merged 1 commit into from
Jun 14, 2021

Conversation

kzu
Copy link
Member

@kzu kzu commented Jun 14, 2021

The dependency on Newtonsoft.Json isn't particularly useful and can cause upstream consumers to take a dependency on Newtonsoft.Json that can potentially break other parts of the app if they depend on a different version.

By switching to the .NET5 built-in serializer (which is also compatible with NS2) we hopefully minimize that risk, while at the same time we get the performance benefits from it. It's also worth noting that since the serializer is used exclusively for to/from serialization from an internal representation (for document-based table storage) the needs for customization that are usually a must-have for Newtonsoft.Json consumers, isn't really a factor (i.e. being able to customize property name serialization format and more).

We provide the previous Newtonsoft.Json-based serializer as a separate package for consumers that depended on the previous serialization for something (perhaps non-public ctor/properties?).

Fixes #30

The dependency on Newtonsoft.Json isn't particularly useful and can cause upstream consumers to take a dependency on Newtonsoft.Json that can potentially break other parts of the app if they depend on a different version.

By switching to the .NET5 built-in serializer (which is also compatible with NS2) we hopefully minimize that risk, while at the same time we get the performance benefits from it. It's also worth noting that since the serializer is used exclusively for to/from serialization from an internal representation (for document-based table storage) the needs for customization that are usually a must-have for Newtonsoft.Json consumers, isn't really a factor (i.e. being able to customize property name serialization format and more).

We provide the previous Newtonsoft.Json-based serializer as a separate package for consumers that depended on the previous serialization for something (perhaps non-public ctor/properties?).

Fixes #30
@kzu kzu enabled auto-merge (rebase) June 14, 2021 14:55
@kzu kzu merged commit 88c7e2f into main Jun 14, 2021
@kzu kzu deleted the dev branch June 14, 2021 14:59
@devlooped devlooped locked and limited conversation to collaborators Oct 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch default built-in serializer to System.Text.Json
1 participant