Lachee / discord-rpc-csharp

C# custom implementation for Discord Rich Presence. Not deprecated and still available!
MIT License
561 stars 93 forks source link

Migrate from Newtonsoft.Json to System.Text.Json #239

Closed jerry08 closed 9 months ago

jerry08 commented 10 months ago

In this pull request, I migrated from Newtonsoft.Json to System.Text.Json, did some code cleanup and added .net core target framework (which would require no dependencies).

Lachee commented 10 months ago

Please see issue #238 . I don't see a need or requirement to upgrade to System.Text.Json.

Also why did you see the need to replace all the tabs with spaces? Ideally when making contributions, try to stick in the same style the project is already written in.

jerry08 commented 10 months ago

It's not required to upgrade to System.Text.Json. However, if one is planning to use .net core framework, it would be more efficient to make use of System.Text.Json that is already shipped with .net core instead of installing a second JSON library. There are a few other advantages.

I used Rosylnator to help with the code clean up. I didn't realize you had tabs in each line. Besides that, you had too many unnecessary white-spaces and blank lines in your code so I removed them (with Rosylnator) to keep things neat and tidy.