[Breaking change]: System.Text.Json
will replace Newtonsoft.Json
in Umbraco 14
#9
Labels
category/binary-incompatible
Existing binaries may encounter a breaking change in behavior.
category/breaking
category/source-incompatible
Source code may encounter a breaking change in behavior when targeting the new version.
cms/release/14.0.0
Description
Newtonsoft.Json will be replaced by System.Text.Json and the dependency on Newtonsoft.Json will be removed in version 14.
Version
Umbraco 14
Previous behavior
Newtonsoft.Json was used to serialize and deserialze to and from JSON. Umbraco had a dependency on Newtonsoft.Json.
New behavior
System.Text.Json is used to serialize and deserialze to and from JSON. Umbraco has a dependency on System.Text.Json.
Type of breaking change
Reason for change
System.Text.Json is the default serialization library in ASP.NET Core.
The performance of System.Text.Json compared to Newtonsoft.Json is desired.
System.Text.Json focuses primarily on performance, security, and standards compliance.
It has some key differences in default behavior and doesn't aim to have feature parity with Newtonsoft.Json.
Recommended action
Use the Umbraco
IJsonSerializer
interface along side standard serialization attributes, instead of taking dependencies directly on Newtonsoft.JsonIf you need some features only in Newtonsoft.Json you will need to take a dependency yourself.
Affected APIs
N/A
The text was updated successfully, but these errors were encountered: