Ervie/jikan.net

Use System.Text.Json instead of Newtonsoft.Json for parsing.

Closed this issue · 2 comments

kotx commented

The System.Text,Json namespace is a relatively new JSON (de)serializing library for .NET, which would reduce one dependency for this project. Would it be possible to implement it instead? here is a doc/overview

Ervie commented

That would require multi framework targetting, as System.Text.Json is part of standard library only for .NET core 3.0, for older you have to add nuget package explicitly (so the number of dependencies would be the same). I'd like to keep compatibility with current .NET Standard 2.0, but other than that I'd would give it a shot. It might take some time due to slight differences between Newtonsoft library and System.Text,Json and fact I'will be leaving for vacation.

Otherwise, this is a good future-proof idea.

Ervie commented

Done, changes are applied in version 1.5.0.

System.Text.Json weights only 30 KB (vs Newtonsoft.Json ~640 KB), so even for older runtimes I think it's worth it. Also did some adjustments, if something broke I would have to release fixed version ¯_(ツ)_/¯