anthonyreilly / NetCoreForce

Salesforce REST API toolkit for .NET Standard and .NET Core
MIT License
111 stars 64 forks source link

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

Open anthonyreilly opened 3 years ago

anthonyreilly commented 3 years ago

Newtonsoft.Json is effectively a legacy library, now that .NET has updated it's native JSON support, migration for performance and support reasons would probably be a good idea.

https://docs.microsoft.com/en-us/dotnet/standard/serialization/system-text-json-migrate-from-newtonsoft-how-to?pivots=dotnet-core-3-1

anthonyreilly commented 3 years ago

Currently no direct replacement for DefaultContractResolver, may need custom implementation https://github.com/dotnet/runtime/issues/31257

jmbryan4 commented 1 year ago

any update on this now that System.Text.Json has more features? Custom Contracts can be defined. https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/custom-contracts

anthonyreilly commented 1 year ago

Thanks for the link - I was waiting for something like that to be added. I'll check it out and see if it will work - I've wanted to migrate away from the old JSON library for a while now.

TonyValenti commented 11 months ago

Hi @anthonyreilly - Do you think you can get this implemented now that .NET 8.0 is out?

By the way, thank you so much for your work with this library.