1 write to Options
System.Text.Json (1)
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (1)
376
Options
= 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)
256
else if (propertyInfo.
Options
.PropertyNamingPolicy is null)
262
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 (23)
425
_jsonTypeInfo ??=
Options
.GetTypeInfoInternal(PropertyType);
448
Options
.RespectRequiredConstructorParameters))
474
if (
Options
.ReferenceHandlingStrategy is JsonKnownReferenceHandler.Preserve &&
486
EscapedNameSection = JsonHelpers.GetEscapedPropertyNameSection(NameAsUtf8Bytes,
Options
.Encoder);
498
if (
Options
.IgnoreNullValues)
501
Debug.Assert(
Options
.DefaultIgnoreCondition == JsonIgnoreCondition.Never);
508
else if (
Options
.DefaultIgnoreCondition == JsonIgnoreCondition.WhenWritingNull)
515
else if (
Options
.DefaultIgnoreCondition == JsonIgnoreCondition.WhenWritingDefault)
579
if (!EffectiveNumberHandling.HasValue &&
Options
.NumberHandling != JsonNumberHandling.Strict)
581
EffectiveNumberHandling =
Options
.NumberHandling;
600
if (!handling.HasValue &&
Options
.NumberHandling != JsonNumberHandling.Strict)
602
handling =
Options
.NumberHandling;
628
:
Options
.PreferredObjectCreationHandling);
679
if (
Options
.ReferenceHandlingStrategy != JsonKnownReferenceHandler.Unspecified)
759
MemberTypes.Property =>
Options
.IgnoreReadOnlyProperties,
760
MemberTypes.Field =>
Options
.IgnoreReadOnlyFields,
861
object value = converter.Read(ref reader, JsonTypeInfo.ObjectType,
Options
)!;
868
JsonElement value = converter.Read(ref reader, typeof(JsonElement),
Options
);
875
EffectiveConverter.ReadElementAndSetProperty(propValue, state.Current.JsonPropertyNameAsString!, ref reader,
Options
, ref state);
887
??
Options
.GetTypeInfoInternal(typeof(TValue));
896
if (
Options
.AllowDuplicateProperties)
924
JsonConverter<JsonElement> converter = (JsonConverter<JsonElement>)
Options
.GetConverterInternal(typeof(JsonElement));
925
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 _);
System\Text\Json\Serialization\ReadStackFrame.cs (1)
129
if (!propertyInfo.
Options
.AllowDuplicateProperties)