Utf8Json
Utf8Json copied to clipboard
Exclude default values from serialization
Hello,
In order to spare bandwidth and to have the same behaviour as Json.NET DefaultValueHandling.Ignore attribute, it would be great to have the possibility to remove default values from serialization.
I've worked on it for the types I'm using (bool, int, double, decimal, enum) in this commit, but I think a general solution would be a nice feature for your library.
It's a very handy feature, indeed.
Or, alternatively, can you guys provide a method to entirely exclude a property on JsonWriter