You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
Remove System.Text.Json reference in Microsoft.Toolkit.Uwp package #3636
We're only using this dependency (which is large) for a single helper in the package. We should streamline this with some docs instead of having a hard dependency. This also makes it easier for folks to use either Newtonsoft.Json or System.Text.Json depending on what their app is already using.
Instead of including explicitly. This will help with #3145 as most other higher-level toolkit libs are including the UI package which also includes this package.
Snafu... the SystemInformation helpers use the LocalObjectStorageHelper which uses this...
Instead of completely requiring the developer to specify the serialization option, do we want to provide a base implementation which uses DataContractJsonSerializer instead? This would basically complete the original #889 issue.
At least for the SystemInformation class, I believe that would be simple enough in terms of data structure to be able to directly read-in any existing uses from apps.
⚠ Since 6.1 shipped with the Newtonsoft Serializer, for testing of the final change, we should make sure we try having a contract serializer with Newtonsoft initialize the SystemInformation storage on the app. Then change to the new serializer and ensure it can read-in all the data to continue from for app migrations.
For more complex app scenarios where devs have done more complex storage, the recommendation is that they provide their own storage helper (as noted above in the issue) for either Newtonsoft or System.Text.Json as they desire.
Activity
michael-hawker commentedon Dec 17, 2020
Snafu... the
SystemInformationhelpers use theLocalObjectStorageHelperwhich uses this...Instead of completely requiring the developer to specify the serialization option, do we want to provide a base implementation which uses
DataContractJsonSerializerinstead? This would basically complete the original #889 issue.At least for the
SystemInformationclass, I believe that would be simple enough in terms of data structure to be able to directly read-in any existing uses from apps.⚠ Since 6.1 shipped with the Newtonsoft Serializer, for testing of the final change, we should make sure we try having a contract serializer with Newtonsoft initialize the SystemInformation storage on the app. Then change to the new serializer and ensure it can read-in all the data to continue from for app migrations.
For more complex app scenarios where devs have done more complex storage, the recommendation is that they provide their own storage helper (as noted above in the issue) for either Newtonsoft or System.Text.Json as they desire.
Replace JsonSerializer with DataContractJsonSerializer in Microsoft.T…
michael-hawker commentedon Jan 6, 2021
Before:
And After (Projected due to #3657):
Savings of: 372,024 🎉🎉🎉
And since most of our other higher-level packages reference this base package, we'll save this amount on those too!