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 System.​Text.​Json.​Serialization.​JsonIgnoreCondition
Assembly: System.Text.Json
Controls how the <see cref="T:System.Text.Json.Serialization.JsonIgnoreAttribute" /> ignores properties on serialization and deserialization.
Values
Never
Property is always serialized and deserialized, regardless of <see cref="P:System.Text.Json.JsonSerializerOptions.IgnoreNullValues" /> configuration.
Always
Property is always ignored.
WhenWritingDefault
Property is ignored only if it equals the default value for its type.
WhenWritingNull
Property is ignored if its value is <see langword="null" /> . This is applied only to reference-type properties and fields.
WhenWriting
Property is ignored during serialization
WhenReading
Property is ignored during deserialization