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