Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Doesn't Text.Json have a much narrower scope and plenty of features supported by Newtonsoft not available?



Uh 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?


System.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.


System.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


System.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.


> 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: