14 references to SerializedValueCheckType
System.Text.Json.SourceGeneration (14)
JsonSourceGenerator.Emitter.cs (14)
1576SerializedValueCheckType defaultCheckType = GetCheckType(contextSpec, propertyGenSpec); 1588if (defaultCheckType != SerializedValueCheckType.None) 1602case SerializedValueCheckType.Ignore: 1605case SerializedValueCheckType.IgnoreWhenNull: 1616case SerializedValueCheckType.IgnoreWhenDefault: 1627case SerializedValueCheckType.DisallowNull: 1878private static SerializedValueCheckType GetCheckType(ContextGenerationSpec contextSpec, PropertyGenerationSpec propertySpec) 1882JsonIgnoreCondition.WhenWriting => SerializedValueCheckType.Ignore, 1883JsonIgnoreCondition.WhenWritingNull => propertySpec.PropertyType.CanBeNull ? SerializedValueCheckType.IgnoreWhenNull : SerializedValueCheckType.None, 1884JsonIgnoreCondition.WhenWritingDefault => propertySpec.PropertyType.CanBeNull ? SerializedValueCheckType.IgnoreWhenNull : SerializedValueCheckType.IgnoreWhenDefault, 1885_ when propertySpec.IsGetterNonNullableAnnotation && contextSpec.GeneratedOptionsSpec?.RespectNullableAnnotations is true => SerializedValueCheckType.DisallowNull, 1886_ => SerializedValueCheckType.None,