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.
Prior to .NET Core, there was no support for JSON serialization/deserialization in the C# standard library. Therefore, it was standard practice to use an external JSON library, and 360 used the most popular and well known of these, Newtonsoft.Json.
However, Microsoft added the System.Text.Json library in the early versions of .NET Core, which was built from the ground up to be significantly more performant and standards-compliant than Newtonsoft.Json and is now feature-complete enough that it ships as the default JSON serialization/deserialization library for ASP.NET Core.
Newtonsoft.Json is gradually becoming less viable as a dependency, and continuing to depend on it complicates our environment as well as increasing our security surface. I have therefore replaced it with System.Text.Json. I verified that serialization and deserialization are handled identically, after tweaking some of the defaults as necessary. There may be potential edge cases, but that is unlikely since our use of Newtonsoft.Json was very simple.