Open rubo opened 3 years ago
Sorry, could you explain what are the benefits of doing this? Thank you in advance.
It's faster, but more importantly it enables us to remove the Newtonsoft dependency, and keeping dependencies low is important for a Bitcoin project.
Not remove Newtonsoft dependency: replace it with another one. Are you claiming that the one to be replaced with brings more legitimacy because it's from Microsoft?
System.Text.Json
is already a dependency shipped to the users' computer regardless if we use Newtonsoft or not.
I thought the point of .NET Core was to break the BCL in many different components so that you didn't need to depend on a monolith. Did they regress on this point with .NET5? If yes, this would only be the case for this target anyway.
Not in the short term. Last time I tried playing wiht System.Text.Json, it was shit and I came back asap to newtonsoft. Waiting 1 or 2 years or somebody making all the converters.
Me too. The main issue with the System.Text.Json that it's not enough just to replace the namespace and/or class name.
Waiting 1 or 2 years or somebody making all the converters (@NicolasDorier)
I can take a stab at this one if there's interest in reviewing/merging. I'd suggest doing so over multiple PRs that gradually replace parts of the codebase using JSON .NET with System.Text.Json adding the necessary converters.
If necessary, we can have both side-by-side for the time being, controlled by a compile-time constant/feature flag e.g. SYSTEMTEXTJSON
introduced in the first PR.
Hei any plans to revise this? I'm working on a Blazor/MAUI PWA app (Client side) and for me adding 2MB of Newtonsoft is bloat I'd rather avoid.
Are there any plans to replace Json.NET with System.Text.Json?