1 write to Options
System.Text.Json (1)
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (1)
381Options = options;
41 references to Options
System.Text.Json (41)
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (2)
384else if (propertyInfo.Options.PropertyNamingPolicy != null) 386name = propertyInfo.Options.PropertyNamingPolicy.ConvertName(memberInfo.Name);
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Helpers.cs (2)
216else if (propertyInfo.Options.PropertyNamingPolicy == null) 222name = 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 (22)
430_jsonTypeInfo ??= Options.GetTypeInfoInternal(PropertyType); 453Options.RespectRequiredConstructorParameters)) 479if (Options.ReferenceHandlingStrategy is JsonKnownReferenceHandler.Preserve && 491EscapedNameSection = JsonHelpers.GetEscapedPropertyNameSection(NameAsUtf8Bytes, Options.Encoder); 503if (Options.IgnoreNullValues) 506Debug.Assert(Options.DefaultIgnoreCondition == JsonIgnoreCondition.Never); 513else if (Options.DefaultIgnoreCondition == JsonIgnoreCondition.WhenWritingNull) 520else if (Options.DefaultIgnoreCondition == JsonIgnoreCondition.WhenWritingDefault) 584if (!EffectiveNumberHandling.HasValue && Options.NumberHandling != JsonNumberHandling.Strict) 586EffectiveNumberHandling = Options.NumberHandling; 605if (!handling.HasValue && Options.NumberHandling != JsonNumberHandling.Strict) 607handling = Options.NumberHandling; 633: Options.PreferredObjectCreationHandling); 684if (Options.ReferenceHandlingStrategy != JsonKnownReferenceHandler.Unspecified) 758MemberTypes.Property => Options.IgnoreReadOnlyProperties, 759MemberTypes.Field => Options.IgnoreReadOnlyFields, 865object value = converter.Read(ref reader, JsonTypeInfo.ObjectType, Options)!; 872JsonElement value = converter.Read(ref reader, typeof(JsonElement), Options); 879EffectiveConverter.ReadElementAndSetProperty(propValue, state.Current.JsonPropertyNameAsString!, ref reader, Options, ref state); 891?? Options.GetTypeInfoInternal(typeof(TValue)); 912JsonConverter<JsonElement> converter = (JsonConverter<JsonElement>)Options.GetConverterInternal(typeof(JsonElement)); 913if (!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 _);