11 writes to NumberHandling
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
Internal\Json\JsonConverterHelper.cs (1)
47
NumberHandling
= JsonNumberHandling.AllowNamedFloatingPointLiterals,
Microsoft.AspNetCore.JsonPatch.SystemTextJson (1)
Internal\DictionaryAdapterOfTU.cs (1)
203
var options = new JsonSerializerOptions() {
NumberHandling
= System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString };
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (1)
Internal\ListAdapterTest.cs (1)
452
serializerOptions.
NumberHandling
= System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString;
Microsoft.AspNetCore.OpenApi.Tests (3)
Services\OpenApiDocumentServiceTestsBase.cs (3)
89
jsonOptions.SerializerOptions.
NumberHandling
= System.Text.Json.Serialization.JsonNumberHandling.Strict;
134
defaultJsonOptions.SerializerOptions.
NumberHandling
= System.Text.Json.Serialization.JsonNumberHandling.Strict;
171
options.SerializerOptions.
NumberHandling
= System.Text.Json.Serialization.JsonNumberHandling.Strict;
Microsoft.Extensions.AI.Abstractions.Tests (2)
Utilities\AIJsonUtilitiesTests.cs (2)
365
JsonSerializerOptions options = new(AIJsonUtilities.DefaultOptions) {
NumberHandling
= JsonNumberHandling.AllowReadingFromString };
413
JsonSerializerOptions options = new(AIJsonUtilities.DefaultOptions) {
NumberHandling
= JsonNumberHandling.AllowReadingFromString };
Microsoft.Extensions.AI.Tests (1)
Functions\AIFunctionFactoryTest.cs (1)
1029
JsonSerializerOptions options = new(JsonContext.Default.Options) {
NumberHandling
= JsonNumberHandling.AllowReadingFromString };
Microsoft.ML.SearchSpace.Tests (1)
SearchSpaceTest.cs (1)
28
NumberHandling
= JsonNumberHandling.Strict,
Sample (1)
Program.cs (1)
19
options.SerializerOptions.
NumberHandling
= JsonNumberHandling.Strict;
67 references to NumberHandling
Microsoft.Extensions.AI.Abstractions.Tests (1)
Utilities\AIJsonUtilitiesTests.cs (1)
40
Assert.Equal(JsonNumberHandling.AllowReadingFromString, options.
NumberHandling
);
System.Text.Json (66)
src\libraries\System.Text.Json\Common\JsonSourceGenerationOptionsAttribute.cs (1)
101
/// Specifies the default value of <see cref="JsonSerializerOptions.
NumberHandling
"/> when set.
System\Text\Json\Nodes\JsonValueOfTPrimitive.cs (1)
51
converter.WriteNumberWithCustomHandling(writer, Value, options.
NumberHandling
);
System\Text\Json\Schema\JsonSchemaExporter.cs (1)
80
JsonNumberHandling effectiveNumberHandling = customNumberHandling ?? typeInfo.NumberHandling ?? typeInfo.Options.
NumberHandling
;
System\Text\Json\Serialization\Converters\Value\ByteConverter.cs (4)
19
if (options?.
NumberHandling
is not null and not JsonNumberHandling.Strict)
21
return ReadNumberWithCustomHandling(ref reader, options.
NumberHandling
, options);
29
if (options?.
NumberHandling
is not null and not JsonNumberHandling.Strict)
31
WriteNumberWithCustomHandling(writer, value, options.
NumberHandling
);
System\Text\Json\Serialization\Converters\Value\DecimalConverter.cs (4)
18
if (options?.
NumberHandling
is not null and not JsonNumberHandling.Strict)
20
return ReadNumberWithCustomHandling(ref reader, options.
NumberHandling
, options);
28
if (options?.
NumberHandling
is not null and not JsonNumberHandling.Strict)
30
WriteNumberWithCustomHandling(writer, value, options.
NumberHandling
);
System\Text\Json\Serialization\Converters\Value\DoubleConverter.cs (4)
19
if (options?.
NumberHandling
is not null and not JsonNumberHandling.Strict)
21
return ReadNumberWithCustomHandling(ref reader, options.
NumberHandling
, options);
29
if (options?.
NumberHandling
is not null and not JsonNumberHandling.Strict)
31
WriteNumberWithCustomHandling(writer, value, options.
NumberHandling
);
System\Text\Json\Serialization\Converters\Value\HalfConverter.cs (4)
24
if (options?.
NumberHandling
is not null and not JsonNumberHandling.Strict)
26
return ReadNumberWithCustomHandling(ref reader, options.
NumberHandling
, options);
39
if (options?.
NumberHandling
is not null and not JsonNumberHandling.Strict)
41
WriteNumberWithCustomHandling(writer, value, options.
NumberHandling
);
System\Text\Json\Serialization\Converters\Value\Int128Converter.cs (4)
23
if (options?.
NumberHandling
is not null and not JsonNumberHandling.Strict)
25
return ReadNumberWithCustomHandling(ref reader, options.
NumberHandling
, options);
38
if (options?.
NumberHandling
is not null and not JsonNumberHandling.Strict)
40
WriteNumberWithCustomHandling(writer, value, options.
NumberHandling
);
System\Text\Json\Serialization\Converters\Value\Int16Converter.cs (4)
19
if (options?.
NumberHandling
is not null and not JsonNumberHandling.Strict)
21
return ReadNumberWithCustomHandling(ref reader, options.
NumberHandling
, options);
29
if (options?.
NumberHandling
is not null and not JsonNumberHandling.Strict)
31
WriteNumberWithCustomHandling(writer, value, options.
NumberHandling
);
System\Text\Json\Serialization\Converters\Value\Int32Converter.cs (4)
19
if (options?.
NumberHandling
is not null and not JsonNumberHandling.Strict)
21
return ReadNumberWithCustomHandling(ref reader, options.
NumberHandling
, options);
29
if (options?.
NumberHandling
is not null and not JsonNumberHandling.Strict)
31
WriteNumberWithCustomHandling(writer, value, options.
NumberHandling
);
System\Text\Json\Serialization\Converters\Value\Int64Converter.cs (4)
19
if (options?.
NumberHandling
is not null and not JsonNumberHandling.Strict)
21
return ReadNumberWithCustomHandling(ref reader, options.
NumberHandling
, options);
29
if (options?.
NumberHandling
is not null and not JsonNumberHandling.Strict)
31
WriteNumberWithCustomHandling(writer, value, options.
NumberHandling
);
System\Text\Json\Serialization\Converters\Value\SByteConverter.cs (4)
19
if (options?.
NumberHandling
is not null and not JsonNumberHandling.Strict)
21
return ReadNumberWithCustomHandling(ref reader, options.
NumberHandling
, options);
29
if (options?.
NumberHandling
is not null and not JsonNumberHandling.Strict)
31
WriteNumberWithCustomHandling(writer, value, options.
NumberHandling
);
System\Text\Json\Serialization\Converters\Value\SingleConverter.cs (4)
20
if (options?.
NumberHandling
is not null and not JsonNumberHandling.Strict)
22
return ReadNumberWithCustomHandling(ref reader, options.
NumberHandling
, options);
30
if (options?.
NumberHandling
is not null and not JsonNumberHandling.Strict)
32
WriteNumberWithCustomHandling(writer, value, options.
NumberHandling
);
System\Text\Json\Serialization\Converters\Value\UInt128Converter.cs (4)
23
if (options?.
NumberHandling
is not null and not JsonNumberHandling.Strict)
25
return ReadNumberWithCustomHandling(ref reader, options.
NumberHandling
, options);
38
if (options?.
NumberHandling
is not null and not JsonNumberHandling.Strict)
40
WriteNumberWithCustomHandling(writer, value, options.
NumberHandling
);
System\Text\Json\Serialization\Converters\Value\UInt16Converter.cs (4)
19
if (options?.
NumberHandling
is not null and not JsonNumberHandling.Strict)
21
return ReadNumberWithCustomHandling(ref reader, options.
NumberHandling
, options);
29
if (options?.
NumberHandling
is not null and not JsonNumberHandling.Strict)
31
WriteNumberWithCustomHandling(writer, value, options.
NumberHandling
);
System\Text\Json\Serialization\Converters\Value\UInt32Converter.cs (4)
19
if (options?.
NumberHandling
is not null and not JsonNumberHandling.Strict)
21
return ReadNumberWithCustomHandling(ref reader, options.
NumberHandling
, options);
29
if (options?.
NumberHandling
is not null and not JsonNumberHandling.Strict)
31
WriteNumberWithCustomHandling(writer, value, options.
NumberHandling
);
System\Text\Json\Serialization\Converters\Value\UInt64Converter.cs (4)
19
if (options?.
NumberHandling
is not null and not JsonNumberHandling.Strict)
21
return ReadNumberWithCustomHandling(ref reader, options.
NumberHandling
, options);
29
if (options?.
NumberHandling
is not null and not JsonNumberHandling.Strict)
31
WriteNumberWithCustomHandling(writer, value, options.
NumberHandling
);
System\Text\Json\Serialization\JsonSerializerContext.cs (1)
65
!JsonHelpers.RequiresSpecialNumberHandlingOnWrite(options.
NumberHandling
) &&
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (4)
584
if (!EffectiveNumberHandling.HasValue && Options.
NumberHandling
!= JsonNumberHandling.Strict)
586
EffectiveNumberHandling = Options.
NumberHandling
;
605
if (!handling.HasValue && Options.
NumberHandling
!= JsonNumberHandling.Strict)
607
handling = Options.
NumberHandling
;
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (2)
488
/// Gets or sets the type-level <see cref="JsonSerializerOptions.
NumberHandling
"/> override.
516
internal JsonNumberHandling EffectiveNumberHandling => _numberHandling ?? Options.
NumberHandling
;