appcenter-sdk-dotnet
appcenter-sdk-dotnet copied to clipboard
Migrate to System.Text.Json
System.Text.Json appears to be Microsofts new library for handling JSON. Some libraries from Microsoft are already using it (e.g. the Microsoft Graph .NET SDK).
Are there any plans for migrating the AppCenter SDK to System.Text.Json? This would be appreciated, not only because of the better (de)serialization performance that System.Text.Json offers, but also because of lesser dependencies needed, making my app's binaries smaller.
Hi @tipa, thank you for bringing this idea to our attention!
It is a good point! I'll create a feature on our board.
The only issue with the migration that I can see now is that we support some dotnet versions which System.Text.Json
doesn't support, for example .NET Framework 4.6.1 for WPF. We will need to still use Newtonsoft.Json
for such unsupported versions.
Thanks a lot for considering!
for example .NET Framework 4.6.1 for WPF
I've read that .NET Framework 4.6.1 will reach End-off-support early next year. Maybe that makes the decision easier ;)
Yep, I was thinking about the this thing too :)
I think .NET Framework 4.6.1 supports .NET Standard 2.0 which is targeted by System.Text.Json. And System.Text.Json has a profile for .NET Framework 4.6.1
Thanks for the information @michaldobrodenka We will take this into account when we do feature.
Just a small reminder that .NET Framework 4.6.1 has reached end-of-support now :)
Would love to see System.Text.Json
to be used soon!
That will be so great if port the Newtonsoft.JSON to System.Text.Json! How's the progress right now?
@DmitriyKirakosyan Are there any updates and/or would you accept pull requests for this?
@tipa it's in our queue after proper .NET 6 support. No exact ETA yet.
Of course contributions are welcome here
I checked out the repo and spent multiple hours trying to successfully build the library, without success. It constantly complains about missing references. No idea how this is supposed to work. The actual JSON-bits were easily replaced, but without being able to test them, a PR doesn't make much sense.
@MatkovIvan any update on this? thanks!
As the original poster mentioned, Microsoft’s own guidance is to migrate from Newtonsoft.Json
to System.Text.Json
. This is not only because of the improved (de)serialization performance that System.Text.Json
offers, but also because it aligns with Microsoft’s own best practices.
Furthermore, the reduction in dependencies would lead to smaller binary sizes for our apps, which is a significant advantage, especially for mobile applications where every byte counts. This migration would make our apps leaner and more efficient.
Given that this request was made back in November 2021 and it’s now February 2024, I believe it’s high time for this migration to take place. Let’s make our apps better by embracing System.Text.Json
!
Thank you for considering this request. I look forward to seeing the AppCenter SDK continue to improve and evolve.
Hi, currently, we do not have plans for this migration. However, we highly value and welcome your contributions.
Do you have any plan for the appcenter-sdk-dotnet in general?