Hacker News new | ask | show | jobs
by rqtwteye 737 days ago
I think Newtonsoft is quite ok, but the MS library lacks a lot.
1 comments

Your information is very out of date. Microsoft long ago worked with the Newtonsoft.Json creator when introducing their native .NET replacement for Newtonsoft.Json. Performance in the new set of libraries is excellent as they rely heavily on the newer performance primitives like Utf8String, Span, etc.
I may indeed be outdated. Does Microsoft now support deserializing into dynamic for example?
You should never do that. Please do not, and I can't stress this enough, use `dynamic`.

If you need DOM-style JSON handling, please use JsonDocument and JsonNode instead: https://learn.microsoft.com/en-us/dotnet/standard/serializat...

There are plenty of cases where dynamic saves a ton of code.
No, it never does. There are better containers than dynamic, that do not have its performance drawbacks and have way better UX. The fact that this does not raise an eyebrow is a legitimate concern over the state of the codebase that uses it!