14 references to SerializedValueCheckType
System.Text.Json.SourceGeneration (14)
JsonSourceGenerator.Emitter.cs (14)
1588SerializedValueCheckType defaultCheckType = GetCheckType(contextSpec, propertyGenSpec); 1600if (defaultCheckType != SerializedValueCheckType.None) 1614case SerializedValueCheckType.Ignore: 1617case SerializedValueCheckType.IgnoreWhenNull: 1628case SerializedValueCheckType.IgnoreWhenDefault: 1639case SerializedValueCheckType.DisallowNull: 1890private static SerializedValueCheckType GetCheckType(ContextGenerationSpec contextSpec, PropertyGenerationSpec propertySpec) 1894JsonIgnoreCondition.WhenWriting => SerializedValueCheckType.Ignore, 1895JsonIgnoreCondition.WhenWritingNull => propertySpec.PropertyType.CanBeNull ? SerializedValueCheckType.IgnoreWhenNull : SerializedValueCheckType.None, 1896JsonIgnoreCondition.WhenWritingDefault => propertySpec.PropertyType.CanBeNull ? SerializedValueCheckType.IgnoreWhenNull : SerializedValueCheckType.IgnoreWhenDefault, 1897_ when propertySpec.IsGetterNonNullableAnnotation && contextSpec.GeneratedOptionsSpec?.RespectNullableAnnotations is true => SerializedValueCheckType.DisallowNull, 1898_ => SerializedValueCheckType.None,