14 references to SerializedValueCheckType
System.Text.Json.SourceGeneration (14)
JsonSourceGenerator.Emitter.cs (14)
826
SerializedValueCheckType
defaultCheckType = GetCheckType(contextSpec, propertyGenSpec);
835
if (defaultCheckType !=
SerializedValueCheckType
.None)
849
case
SerializedValueCheckType
.Ignore:
852
case
SerializedValueCheckType
.IgnoreWhenNull:
863
case
SerializedValueCheckType
.IgnoreWhenDefault:
874
case
SerializedValueCheckType
.DisallowNull:
1062
private static
SerializedValueCheckType
GetCheckType(ContextGenerationSpec contextSpec, PropertyGenerationSpec propertySpec)
1066
JsonIgnoreCondition.WhenWriting =>
SerializedValueCheckType
.Ignore,
1067
JsonIgnoreCondition.WhenWritingNull => propertySpec.PropertyType.CanBeNull ?
SerializedValueCheckType
.IgnoreWhenNull :
SerializedValueCheckType
.None,
1068
JsonIgnoreCondition.WhenWritingDefault => propertySpec.PropertyType.CanBeNull ?
SerializedValueCheckType
.IgnoreWhenNull :
SerializedValueCheckType
.IgnoreWhenDefault,
1069
_ when propertySpec.IsGetterNonNullableAnnotation && contextSpec.GeneratedOptionsSpec?.RespectNullableAnnotations is true =>
SerializedValueCheckType
.DisallowNull,
1070
_ =>
SerializedValueCheckType
.None,