12 references to SerializedValueCheckType
System.Text.Json.SourceGeneration (12)
JsonSourceGenerator.Emitter.cs (12)
826
SerializedValueCheckType
defaultCheckType = GetCheckType(contextSpec, propertyGenSpec);
835
if (defaultCheckType !=
SerializedValueCheckType
.None)
849
case
SerializedValueCheckType
.IgnoreWhenNull:
860
case
SerializedValueCheckType
.IgnoreWhenDefault:
871
case
SerializedValueCheckType
.DisallowNull:
1058
private static
SerializedValueCheckType
GetCheckType(ContextGenerationSpec contextSpec, PropertyGenerationSpec propertySpec)
1062
JsonIgnoreCondition.WhenWritingNull => propertySpec.PropertyType.CanBeNull ?
SerializedValueCheckType
.IgnoreWhenNull :
SerializedValueCheckType
.None,
1063
JsonIgnoreCondition.WhenWritingDefault => propertySpec.PropertyType.CanBeNull ?
SerializedValueCheckType
.IgnoreWhenNull :
SerializedValueCheckType
.IgnoreWhenDefault,
1064
_ when propertySpec.IsGetterNonNullableAnnotation && contextSpec.GeneratedOptionsSpec?.RespectNullableAnnotations is true =>
SerializedValueCheckType
.DisallowNull,
1065
_ =>
SerializedValueCheckType
.None,