Feature: Migrate profile files from xml to json#3299
Merged
mergify[bot] merged 6 commits intomainfrom Jan 5, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request implements a significant migration of the profile storage system from XML to JSON format. The changes include comprehensive migration logic with automatic backup creation, support for both encrypted and unencrypted profiles, and temporary events to signal migration progress.
Key Changes
- Profile file format changed from XML to JSON with automatic one-time migration on first load
- Migration creates timestamped backups in a dedicated Backups subfolder before converting files
- Added migration events (
OnProfileMigrationStartedandOnProfileMigrationCompleted) marked as obsolete for future removal
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 17 comments.
| File | Description |
|---|---|
| Website/docs/changelog/next-release.md | Documents the XML to JSON migration, automatic conversion behavior, and backup strategy |
| Source/NETworkManager/MainWindow.xaml.cs | Registers migration event handlers and removes unused import statement |
| Source/NETworkManager.Settings/SettingsManager.cs | Renames parameter from settingsFilePath to filePath for consistency with profile backups |
| Source/NETworkManager.Profiles/ProfileManager.cs | Core migration implementation including JSON serialization, XML detection, legacy file handling, and backup functionality |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5 tasks
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes proposed in this pull request
Copilot generated summary
Provide a Copilot generated summary of the changes in this pull request.
Copilot summary
This pull request introduces a major migration for profile storage in
ProfileManager.cs, moving from XML-based profiles to a new JSON-based format. It adds support for detecting, migrating, and backing up legacy XML profiles, ensures consistent JSON serialization, and updates all relevant serialization logic. The changes also introduce events and logging to track the migration process, and provide backup mechanisms for legacy files.Profile format migration and serialization updates:
.xmlto.json, added a legacy XML extension for migration, and implemented consistent JSON serialization options usingSystem.Text.Json.Legacy XML profile migration and backup:
Migration process events and logging:
OnProfileMigrationStarted,OnProfileMigrationCompleted) and corresponding methods to signal the start and completion of profile migration, along with detailed logging throughout the migration process for better traceability. [1] [2] [3]These changes ensure a smooth transition from XML to JSON profile storage, improve maintainability, and provide robust handling and auditing of the migration process.
To-Do
Contributing
By submitting this pull request, I confirm the following: