mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-01-18 06:29:44 +08:00
Fix saving to JSON in PT Settings (#5197)
* Added argument to fix saving to JSON in PT Settings * Added argument to fix saving to JSON in PT Settings
This commit is contained in:
parent
b6e5a5e655
commit
47736603af
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user