mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-01-18 22:43:31 +08:00
Json: Overwriting instead of add to list
http://stackoverflow.com/questions/29113063/json-net-why-does-it-add-to-list-instead-of-overwriting
This commit is contained in:
parent
26addf809e
commit
813d33fc4d
@ -26,7 +26,11 @@ namespace Wox.Infrastructure.Storage
|
||||
|
||||
// use property initialization instead of DefaultValueAttribute
|
||||
// easier and flexible for default value of object
|
||||
_serializerSettings = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
|
||||
_serializerSettings = new JsonSerializerSettings
|
||||
{
|
||||
ObjectCreationHandling = ObjectCreationHandling.Replace,
|
||||
NullValueHandling = NullValueHandling.Ignore
|
||||
};
|
||||
}
|
||||
|
||||
public T Load()
|
||||
|
Loading…
Reference in New Issue
Block a user