1 write to Options
System.Text.Json (1)
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (1)
381
Options
= options;
41 references to Options
System.Text.Json (41)
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (2)
384
else if (propertyInfo.
Options
.PropertyNamingPolicy != null)
386
name = propertyInfo.
Options
.PropertyNamingPolicy.ConvertName(memberInfo.Name);
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Helpers.cs (2)
216
else if (propertyInfo.
Options
.PropertyNamingPolicy == null)
222
name = propertyInfo.
Options
.PropertyNamingPolicy.ConvertName(declaredPropertyName);
System\Text\Json\Serialization\Metadata\JsonParameterInfo.cs (1)
119
internal JsonSerializerOptions Options => MatchingProperty.
Options
;
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (22)
430
_jsonTypeInfo ??=
Options
.GetTypeInfoInternal(PropertyType);
453
Options
.RespectRequiredConstructorParameters))
479
if (
Options
.ReferenceHandlingStrategy is JsonKnownReferenceHandler.Preserve &&
491
EscapedNameSection = JsonHelpers.GetEscapedPropertyNameSection(NameAsUtf8Bytes,
Options
.Encoder);
503
if (
Options
.IgnoreNullValues)
506
Debug.Assert(
Options
.DefaultIgnoreCondition == JsonIgnoreCondition.Never);
513
else if (
Options
.DefaultIgnoreCondition == JsonIgnoreCondition.WhenWritingNull)
520
else if (
Options
.DefaultIgnoreCondition == JsonIgnoreCondition.WhenWritingDefault)
584
if (!EffectiveNumberHandling.HasValue &&
Options
.NumberHandling != JsonNumberHandling.Strict)
586
EffectiveNumberHandling =
Options
.NumberHandling;
605
if (!handling.HasValue &&
Options
.NumberHandling != JsonNumberHandling.Strict)
607
handling =
Options
.NumberHandling;
633
:
Options
.PreferredObjectCreationHandling);
684
if (
Options
.ReferenceHandlingStrategy != JsonKnownReferenceHandler.Unspecified)
758
MemberTypes.Property =>
Options
.IgnoreReadOnlyProperties,
759
MemberTypes.Field =>
Options
.IgnoreReadOnlyFields,
865
object value = converter.Read(ref reader, JsonTypeInfo.ObjectType,
Options
)!;
872
JsonElement value = converter.Read(ref reader, typeof(JsonElement),
Options
);
879
EffectiveConverter.ReadElementAndSetProperty(propValue, state.Current.JsonPropertyNameAsString!, ref reader,
Options
, ref state);
891
??
Options
.GetTypeInfoInternal(typeof(TValue));
912
JsonConverter<JsonElement> converter = (JsonConverter<JsonElement>)
Options
.GetConverterInternal(typeof(JsonElement));
913
if (!converter.TryRead(ref reader, typeof(JsonElement),
Options
, ref state, out JsonElement jsonElement, out _))
System\Text\Json\Serialization\Metadata\JsonPropertyInfoOfT.cs (14)
124
if (
Options
.RespectRequiredConstructorParameters)
152
Options
.ExpandConverterFactory(CustomConverter, PropertyType) // Expand any property-level custom converters.
181
Options
.ReferenceHandlingStrategy == JsonKnownReferenceHandler.IgnoreCycles &&
212
if (!IsGetNullable &&
Options
.RespectNullableAnnotations)
226
EffectiveConverter.Write(writer, value,
Options
);
247
return EffectiveConverter.TryWrite(writer, value,
Options
, ref state);
269
success = EffectiveConverter.TryWriteDataExtensionProperty(writer, value,
Options
, ref state);
296
if (!IsSetNullable &&
Options
.RespectNullableAnnotations)
317
T? fastValue = EffectiveConverter.Read(ref reader, PropertyType,
Options
);
319
if (fastValue is null && !IsSetNullable &&
Options
.RespectNullableAnnotations)
337
success = EffectiveConverter.TryRead(ref reader, PropertyType,
Options
, ref state, out T? value, out bool populatedValue);
348
if (value is null && !IsSetNullable &&
Options
.RespectNullableAnnotations)
387
value = EffectiveConverter.Read(ref reader, PropertyType,
Options
);
392
success = EffectiveConverter.TryRead(ref reader, PropertyType,
Options
, ref state, out T? typedValue, out _);