14 references to SerializedValueCheckType
System.Text.Json.SourceGeneration (14)
JsonSourceGenerator.Emitter.cs (14)
1479SerializedValueCheckType defaultCheckType = GetCheckType(contextSpec, propertyGenSpec); 1491if (defaultCheckType != SerializedValueCheckType.None) 1505case SerializedValueCheckType.Ignore: 1508case SerializedValueCheckType.IgnoreWhenNull: 1519case SerializedValueCheckType.IgnoreWhenDefault: 1530case SerializedValueCheckType.DisallowNull: 1770private static SerializedValueCheckType GetCheckType(ContextGenerationSpec contextSpec, PropertyGenerationSpec propertySpec) 1774JsonIgnoreCondition.WhenWriting => SerializedValueCheckType.Ignore, 1775JsonIgnoreCondition.WhenWritingNull => propertySpec.PropertyType.CanBeNull ? SerializedValueCheckType.IgnoreWhenNull : SerializedValueCheckType.None, 1776JsonIgnoreCondition.WhenWritingDefault => propertySpec.PropertyType.CanBeNull ? SerializedValueCheckType.IgnoreWhenNull : SerializedValueCheckType.IgnoreWhenDefault, 1777_ when propertySpec.IsGetterNonNullableAnnotation && contextSpec.GeneratedOptionsSpec?.RespectNullableAnnotations is true => SerializedValueCheckType.DisallowNull, 1778_ => SerializedValueCheckType.None,