-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Remove System.Text.Json
reference in Microsoft.Toolkit.Uwp
package
#3636
Comments
Snafu... the Instead of completely requiring the developer to specify the serialization option, do we want to provide a base implementation which uses At least for the ⚠ 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. |
…oolkit.Uwp. (#3637) <!-- 🚨 Please Do Not skip any instructions and information mentioned below as they are all required and essential to evaluate and test the PR. By fulfilling all the required information you will be able to reduce the volume of questions and most likely help merge the PR faster 🚨 --> <!-- 📝 It is preferred if you keep the "☑️ Allow edits by maintainers" checked in the Pull Request Template as it increases collaboration with the Toolkit maintainers by permitting commits to your PR branch (only) created from your fork. This can let us quickly make fixes for minor typos or forgotten StyleCop issues during review without needing to wait on you doing extra work. Let us help you help us! 🎉 --> ## Fixes #3636 <!-- Add the relevant issue number after the "#" mentioned above (for ex: Fixes #1234) which will automatically close the issue once the PR is merged. --> <!-- Add a brief overview here of the feature/bug & fix. --> Change implementation of JsonObjectSerializer to use DataContractJsonSerializer ## PR Type What kind of change does this PR introduce? <!-- Please uncomment one or more that apply to this PR. --> <!-- - Bugfix --> <!-- - Feature --> <!-- - Code style update (formatting) --> <!-- - Refactoring (no functional changes, no api changes) --> <!-- - Build or CI related changes --> <!-- - Documentation content changes --> <!-- - Sample app changes --> <!-- - Other... Please describe: --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying, or link to a relevant issue. --> Microsoft.Toolkit.Uwp uses JsonSerializer ## What is the new behavior? <!-- Describe how was this issue resolved or changed? --> Microsoft.Toolkit.Uwp uses DataContractJsonSerializer ## PR Checklist Please check if your PR fulfills the following requirements: - [ ] Tested code with current [supported SDKs](../readme.md#supported) - [ ] Pull Request has been submitted to the documentation repository [instructions](..\contributing.md#docs). Link: <!-- docs PR link --> - [ ] Sample in sample app has been added / updated (for bug fixes / features) - [ ] Icon has been created (if new sample) following the [Thumbnail Style Guide and templates](https://github.com/windows-toolkit/WindowsCommunityToolkit-design-assets) - [ ] Tests for the changes have been added (for bug fixes / features) (if applicable) - [ ] Header has been added to all new source files (run *build/UpdateHeaders.bat*) - [ ] Contains **NO** breaking changes <!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. Please note that breaking changes are likely to be rejected within minor release cycles or held until major versions. --> ## Other information
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! |
Describe the bug
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
orSystem.Text.Json
depending on what their app is already using.Add docs for:
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.
FYI @vgromfeld @simop-msft
The text was updated successfully, but these errors were encountered: