Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
enum Newtonsoft.​Json.​DefaultValueHandling
Assembly: Newtonsoft.Json
Specifies default value handling options for the <see cref="T:Newtonsoft.Json.JsonSerializer" /> .
Values
Include
Include members where the member value is the same as the member's default value when serializing objects.
Included members are written to JSON. Has no effect when deserializing.
Ignore
Ignore members where the member value is the same as the member's default value when serializing objects
so that it is not written to JSON.
This option will ignore all default values (e.g. <c>null</c> for objects and nullable types; <c>0</c> for integers,
decimals and floating point numbers; and <c>false</c> for booleans). The default value ignored can be changed by
placing the <see cref="T:System.ComponentModel.DefaultValueAttribute" /> on the property.
Populate
Members with a default value but no JSON will be set to their default value when deserializing.
IgnoreAndPopulate
Ignore members where the member value is the same as the member's default value when serializing objects
and set members to their default value when deserializing.