Switch default built-in serializer to System.Text.Json #31
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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