-
-
Notifications
You must be signed in to change notification settings - Fork 56
chore: migrates Newtonsoft.Json to System.Text.Json #669
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR migrates the codebase from Newtonsoft.Json to System.Text.Json following Microsoft's migration guide. The change aims to improve performance and reduce dependencies by using the built-in JSON serialization library.
Key changes:
- Replaced Newtonsoft.Json with System.Text.Json imports across affected files
- Updated JSON parsing logic to use JsonDocument and JsonElement APIs
- Modified serialization calls to use JsonSerializer instead of JsonConvert
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
LivelyWallpaperPlayerViewModel.cs | Updated JSON parsing logic for wallpaper properties and replaced serialization calls |
LivelyWallpaperService.cs | Replaced deserialization calls for LivelyInfoModel |
WebView2Util.cs | Updated parameter serialization in script execution helper |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
In Lively I am using JsonConverter now. Here that maybe overkill, don't have experience with System.Text.Json but
|
Thanks for the info. It should work fine, but I’m still mildly concerned about .Net Native support for System.Text.Json. |
You can verify by running with .NET Native in debug mode with this wallpaper (which I use for testing myself): |
The info looks correct but can't verify the properties. Debug and Release mode aren't really my concern. ![]() |
Just remove the music wallpaper check and run the wallpaper as visualizer.
|
Correct again, but the app hangs after clicking Gravacao.2025-09-15.204929.mp4 |
Works perfectly fine on both Debug and Release builds, but I still have some concerns about the Store build. @rocksdanister Can you take a look and confirm that there are no regressions or hidden edge cases?
Followed the steps in this guide.