mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-23 19:49:43 +01: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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user