Skip to content

Conversation

@Hirogen
Copy link
Collaborator

@Hirogen Hirogen commented Jan 23, 2026

This pull request improves backward compatibility handling for legacy JSON property names in the settings and preferences classes, ensuring that obsolete properties are correctly ignored during serialization and do not cause issues when loading or saving configuration files. It also introduces comprehensive tests to verify correct behavior with old and mixed-format data.

Backward compatibility improvements:

  • Updated obsolete properties (HilightGroupList and HilightEntryList) in Preferences, Settings, and HighlightGroup to ensure they are ignored by System.Text.Json during serialization, and configured Newtonsoft.Json to ignore default/null values. These properties now always return null to prevent accidental serialization. [1] [2] [3] [4]

Testing enhancements:

  • Added new tests in ConfigManagerTest.cs to verify:
    • Legacy JSON with the old hilightGroupList typo loads correctly into the new property.
    • Saving as JSON does not write obsolete property names.
    • Loading JSON with both new and old property names does not create duplicate entries.

@Hirogen Hirogen merged commit 38864a6 into Development Jan 23, 2026
1 check passed
@Hirogen Hirogen deleted the unittestsfix branch January 23, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants