3 ms·
The go-to nowadays is System.Text.Json, developed by the same person as Newtonsoft.Json, built in to .NET. Newtonsoft.Json as the primary JSON serializer (at l
by monerofglory 11mo ago
The go-to nowadays is System.Text.Json, developed by the same person as Newtonsoft.Json, built in to .NET.
Newtonsoft.Json as the primary JSON serializer (at least in every place I've worked) has NOT been the case versus System.Text.Json for years. Though it certainly used to be the case.
- kurokawad 11mo agoUh okay! I was not aware of this. Thanks for pointing that out. Why is there so much difference in the NuGet downloads between both libraries tho?
- Hawxy 11mo ago> Why is there so much difference in the NuGet downloads between both libraries tho? Because there's a boatload of older .NET apps that have been using Newtonsoft for over a decade already and aren't in a rush to switch. Anything built on .NET Framework is likely to still use Newtonsoft.
- akoeplinger 11mo agoSystem.Text.Json ships as part of the shared framework in recent versions of .NET so for most users it won't be restored from nuget.org
- xnorswap 11mo agoSystem.Text.Json isn't needed as a nuget library for newer development, the library is only needed for older stuff. Those older stuff are likely running newtonsoft.Json anyway. There's also a load of .NET Framework applications still running Newstonsoft.
- WorldMaker 11mo agoSystem.Text.Json is out-of-the-box in .NET > 5. The NuGet package is primarily a compatibility layer for people still supporting .NET 4.x for whatever reason.
- gf000 11mo agoDoesn't Text.Json have a much narrower scope and plenty of features supported by Newtonsoft not available?
- orphea 11mo agoNo, not plenty: https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/migrate-from-newtonsoft?pivots=dotnet-10-0#table-of-differences https://learn.microsoft.com/en-us/dotnet/standard/serializat...