←back to thread

.NET 10

(devblogs.microsoft.com)
489 points runesoerensen | 8 comments | | HN request time: 0.815s | source | bottom
Show context
kurokawad ◴[] No.45898241[source]
To me, it's pretty much unbelievable that Microsoft introduces an agent framework while for JSON serializing third-party Newtonsoft is still the go-to.

Edit. I was not aware that the gap between System.Text.Json and Newtonsoft narrowed, take my comment with a grain of salt, please!

replies(5): >>45898252 #>>45898257 #>>45898281 #>>45899376 #>>45904557 #
1. monerofglory ◴[] No.45898281[source]
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.

replies(2): >>45898298 #>>45902502 #
2. kurokawad ◴[] No.45898298[source]
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?
replies(4): >>45898424 #>>45898540 #>>45898548 #>>45905845 #
3. Hawxy ◴[] No.45898424[source]
> 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.

4. akoeplinger ◴[] No.45898540[source]
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
5. xnorswap ◴[] No.45898548[source]
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.

6. gf000 ◴[] No.45902502[source]
Doesn't Text.Json have a much narrower scope and plenty of features supported by Newtonsoft not available?
replies(1): >>45905380 #
7. orphea ◴[] No.45905380[source]
No, not plenty: https://learn.microsoft.com/en-us/dotnet/standard/serializat...
8. WorldMaker ◴[] No.45905845[source]
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.