1 write to Options
System.Text.Json (1)
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (1)
376Options = options;
42 references to Options
System.Text.Json (42)
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (1)
864?? propertyInfo.Options.PropertyNamingPolicy;
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Helpers.cs (2)
256else if (propertyInfo.Options.PropertyNamingPolicy is null) 262name = propertyInfo.Options.PropertyNamingPolicy.ConvertName(declaredPropertyName);
System\Text\Json\Serialization\Metadata\JsonParameterInfo.cs (1)
119internal JsonSerializerOptions Options => MatchingProperty.Options;
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (23)
425_jsonTypeInfo ??= Options.GetTypeInfoInternal(PropertyType); 448Options.RespectRequiredConstructorParameters)) 474if (Options.ReferenceHandlingStrategy is JsonKnownReferenceHandler.Preserve && 486EscapedNameSection = JsonHelpers.GetEscapedPropertyNameSection(NameAsUtf8Bytes, Options.Encoder); 498if (Options.IgnoreNullValues) 501Debug.Assert(Options.DefaultIgnoreCondition == JsonIgnoreCondition.Never); 508else if (Options.DefaultIgnoreCondition == JsonIgnoreCondition.WhenWritingNull) 515else if (Options.DefaultIgnoreCondition == JsonIgnoreCondition.WhenWritingDefault) 579if (!EffectiveNumberHandling.HasValue && Options.NumberHandling != JsonNumberHandling.Strict) 581EffectiveNumberHandling = Options.NumberHandling; 600if (!handling.HasValue && Options.NumberHandling != JsonNumberHandling.Strict) 602handling = Options.NumberHandling; 628: Options.PreferredObjectCreationHandling); 679if (Options.ReferenceHandlingStrategy != JsonKnownReferenceHandler.Unspecified) 759MemberTypes.Property => Options.IgnoreReadOnlyProperties, 760MemberTypes.Field => Options.IgnoreReadOnlyFields, 861object value = converter.Read(ref reader, JsonTypeInfo.ObjectType, Options)!; 868JsonElement value = converter.Read(ref reader, typeof(JsonElement), Options); 875EffectiveConverter.ReadElementAndSetProperty(propValue, state.Current.JsonPropertyNameAsString!, ref reader, Options, ref state); 887?? Options.GetTypeInfoInternal(typeof(TValue)); 896if (Options.AllowDuplicateProperties) 924JsonConverter<JsonElement> converter = (JsonConverter<JsonElement>)Options.GetConverterInternal(typeof(JsonElement)); 925if (!converter.TryRead(ref reader, typeof(JsonElement), Options, ref state, out JsonElement jsonElement, out _))
System\Text\Json\Serialization\Metadata\JsonPropertyInfoOfT.cs (14)
124if (Options.RespectRequiredConstructorParameters) 152Options.ExpandConverterFactory(CustomConverter, PropertyType) // Expand any property-level custom converters. 181Options.ReferenceHandlingStrategy == JsonKnownReferenceHandler.IgnoreCycles && 212if (!IsGetNullable && Options.RespectNullableAnnotations) 226EffectiveConverter.Write(writer, value, Options); 247return EffectiveConverter.TryWrite(writer, value, Options, ref state); 269success = EffectiveConverter.TryWriteDataExtensionProperty(writer, value, Options, ref state); 296if (!IsSetNullable && Options.RespectNullableAnnotations) 317T? fastValue = EffectiveConverter.Read(ref reader, PropertyType, Options); 319if (fastValue is null && !IsSetNullable && Options.RespectNullableAnnotations) 337success = EffectiveConverter.TryRead(ref reader, PropertyType, Options, ref state, out T? value, out bool populatedValue); 348if (value is null && !IsSetNullable && Options.RespectNullableAnnotations) 387value = EffectiveConverter.Read(ref reader, PropertyType, Options); 392success = EffectiveConverter.TryRead(ref reader, PropertyType, Options, ref state, out T? typedValue, out _);
System\Text\Json\Serialization\ReadStackFrame.cs (1)
129if (!propertyInfo.Options.AllowDuplicateProperties)