Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
kotx opened this issue Sep 9, 2020 · 2 comments
Closed

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

kotx opened this issue Sep 9, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@kotx
Copy link

kotx commented Sep 9, 2020

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
Copy link
Owner

Ervie commented Sep 10, 2020

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 Ervie self-assigned this Sep 10, 2020
@Ervie Ervie added the enhancement New feature or request label Sep 10, 2020
@Ervie
Copy link
Owner

Ervie commented Sep 10, 2020

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 ¯_(ツ)_/¯

@Ervie Ervie closed this as completed Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants