diff --git a/src/core/Microsoft.PowerToys.Settings.UI.Lib/BasePTModuleSettings.cs b/src/core/Microsoft.PowerToys.Settings.UI.Lib/BasePTModuleSettings.cs index 2a3b7b843e..a638ade38c 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI.Lib/BasePTModuleSettings.cs +++ b/src/core/Microsoft.PowerToys.Settings.UI.Lib/BasePTModuleSettings.cs @@ -20,7 +20,8 @@ namespace Microsoft.PowerToys.Settings.UI.Lib // converts the current to a json string. public virtual string ToJsonString() { - return JsonSerializer.Serialize(this); + // By default JsonSerializer will only serialize the properties in the base class. This can be avoided by passing the object type (more details at https://stackoverflow.com/a/62498888) + return JsonSerializer.Serialize(this, this.GetType()); } } }