Enum DefaultValueHandling
- Namespace
- Dynamicweb.Core.Json.Settings
- Assembly
- Dynamicweb.Core.dll
Specifies default value handling options for the JsonSerializer.
[Flags]
public enum DefaultValueHandling
Fields
Ignore = 1
- 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.
null
for objects and nullable types;0
for integers, decimals and floating point numbers; andfalse
for booleans). The default value ignored can be changed by placing the DefaultValue Attribute on the property. IgnoreAndPopulate = Ignore | Populate
- 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.
Include = 0
- 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.
Populate = 2
- Members with a default value but no JSON will be set to their default value when deserializing.