devlooped/TableStorage

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

kzu opened this issue · 0 comments

kzu commented

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 should 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?).