93 instantiations of JsonSerializerOptions
Aspire.Dashboard (2)
Model\BrowserStorage\LocalBrowserStorage.cs (1)
12private static readonly JsonSerializerOptions s_options = new()
Otlp\Model\OtlpHelpers.cs (1)
21private static readonly JsonSerializerOptions s_jsonSerializerOptions = new JsonSerializerOptions
Aspire.Hosting (1)
src\Shared\SecretsStore.cs (1)
68var json = contents.ToJsonString(new()
BasicTestApp (1)
TestJsonSerializerOptionsProvider.cs (1)
10public static JsonSerializerOptions Options { get; } = new JsonSerializerOptions
BasicWebSite (1)
Controllers\JsonResultWithSystemTextJsonController.cs (1)
15_customSerializerSettings = new JsonSerializerOptions();
BasketService (1)
Repositories\RedisBasketRepository.cs (1)
12private static readonly JsonSerializerOptions s_jsonSerializerOptions = new()
ConfigurationSchemaGenerator (1)
ConfigSchemaEmitter.cs (1)
25private static readonly JsonSerializerOptions s_serializerOptions = new()
ConfigurationSchemaGenerator.Tests (1)
GeneratorTests.cs (1)
52private static readonly JsonSerializerOptions s_testSerializerOptions = new() { WriteIndented = true };
dotnet-user-jwts (1)
Helpers\JwtSerializerOptions.cs (1)
10public static JsonSerializerOptions Default { get; } = new()
InMemory.FunctionalTests (1)
EventSourceTests.cs (1)
460_logger?.LogInformation("{event}", JsonSerializer.Serialize(eventData, new JsonSerializerOptions
Microsoft.AspNetCore.Authentication.Core.Test (1)
AuthenticationPropertiesTests.cs (1)
375var options = new JsonSerializerOptions() { WriteIndented = true }; // Indented for readability if test fails
Microsoft.AspNetCore.Authentication.Twitter (1)
TwitterHandler.cs (1)
404public static readonly TwitterJsonContext DefaultWithOptions = new TwitterJsonContext(new JsonSerializerOptions
Microsoft.AspNetCore.Components (1)
src\Components\Shared\src\JsonSerializerOptionsProvider.cs (1)
10public static readonly JsonSerializerOptions Options = new()
Microsoft.AspNetCore.Components.Endpoints (3)
Assets\ImportMapSerializerContext.cs (1)
15public static ImportMapSerializerContext CustomEncoder => _customEncoder ??= new(new JsonSerializerOptions
src\Shared\Components\ServerComponentSerializationSettings.cs (1)
14new JsonSerializerOptions
src\Shared\Components\WebAssemblyComponentSerializationSettings.cs (1)
12new JsonSerializerOptions
Microsoft.AspNetCore.Components.Server (2)
src\Components\Shared\src\JsonSerializerOptionsProvider.cs (1)
10public static readonly JsonSerializerOptions Options = new()
src\Shared\Components\ServerComponentSerializationSettings.cs (1)
14new JsonSerializerOptions
Microsoft.AspNetCore.Components.Server.Tests (5)
ElementReferenceJsonConverterTest.cs (5)
31Converter.Write(writer, elementReference, new JsonSerializerOptions()); 50var elementReference = Converter.Read(ref reader, typeof(ElementReference), new JsonSerializerOptions()); 70var elementReference = Converter.Read(ref reader, typeof(ElementReference), new JsonSerializerOptions()); 88Converter.Read(ref reader, typeof(ElementReference), new JsonSerializerOptions()); 107Converter.Read(ref reader, typeof(ElementReference), new JsonSerializerOptions());
Microsoft.AspNetCore.Components.Web (1)
WebRenderer.cs (1)
128var newJsonOptions = new JsonSerializerOptions(jsonOptions);
Microsoft.AspNetCore.Components.WebAssembly (2)
src\Components\Shared\src\JsonSerializerOptionsProvider.cs (1)
10public static readonly JsonSerializerOptions Options = new()
src\Shared\Components\WebAssemblyComponentSerializationSettings.cs (1)
12new JsonSerializerOptions
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
TargetPickerUi.cs (1)
22private static readonly JsonSerializerOptions JsonOptions = new JsonSerializerOptions
Microsoft.AspNetCore.Components.WebView (2)
src\Components\Shared\src\JsonSerializerOptionsProvider.cs (1)
10public static readonly JsonSerializerOptions Options = new()
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (1)
330public static readonly SourceGenerationContext DefaultWithConverter = new SourceGenerationContext(new JsonSerializerOptions
Microsoft.AspNetCore.Diagnostics (1)
DeveloperExceptionPage\DeveloperExceptionPageMiddlewareImpl.cs (1)
81return new ExtensionsExceptionJsonContext(new JsonSerializerOptions(jsonOptions.SerializerOptions));
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
Internal\Json\JsonConverterHelper.cs (1)
44var options = new JsonSerializerOptions
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (4)
ConverterTests\MessageTypeInfoResolverTests.cs (4)
20Assert.Null(resolver.GetTypeInfo(typeof(IMessage), new JsonSerializerOptions())); 28Assert.Null(resolver.GetTypeInfo(typeof(IMessage<HelloRequest>), new JsonSerializerOptions())); 36Assert.Null(resolver.GetTypeInfo(typeof(IBufferMessage), new JsonSerializerOptions())); 47var typeInfo = resolver.GetTypeInfo(typeof(HelloRequest), new JsonSerializerOptions());
Microsoft.AspNetCore.Grpc.Swagger (1)
GrpcSwaggerServiceExtensions.cs (1)
50var serializerOptions = s.GetService<IOptions<JsonOptions>>()?.Value?.JsonSerializerOptions ?? new JsonSerializerOptions();
Microsoft.AspNetCore.Grpc.Swagger.Tests (1)
SchemaGeneratorIntegrationTests.cs (1)
23var dataContractResolver = new GrpcDataContractResolver(new JsonSerializerDataContractResolver(new JsonSerializerOptions()), descriptorRegistry);
Microsoft.AspNetCore.Hosting (1)
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (1)
330public static readonly SourceGenerationContext DefaultWithConverter = new SourceGenerationContext(new JsonSerializerOptions
Microsoft.AspNetCore.Http.Abstractions.Tests (1)
ProblemDetailsJsonConverterTest.cs (1)
106var serializerOptions = new JsonSerializerOptions(JsonSerializerOptions) { UnknownTypeHandling = System.Text.Json.Serialization.JsonUnknownTypeHandling.JsonNode };
Microsoft.AspNetCore.Http.Extensions (2)
JsonOptions.cs (2)
16internal static readonly JsonSerializerOptions DefaultSerializerOptions = new JsonSerializerOptions(JsonSerializerDefaults.Web) 34public JsonSerializerOptions SerializerOptions { get; } = new JsonSerializerOptions(DefaultSerializerOptions);
Microsoft.AspNetCore.Http.Extensions.Tests (11)
HttpRequestJsonExtensionsTests.cs (4)
87var options = new JsonSerializerOptions(); 219var options = new JsonSerializerOptions(); 240var options = new JsonSerializerOptions(); 262var options = new JsonSerializerOptions();
HttpResponseJsonExtensionsTests.cs (3)
66var options = new JsonSerializerOptions(); 454var options = new JsonSerializerOptions(); 475var options = new JsonSerializerOptions();
RequestDelegateFactoryTests.cs (2)
1354var deserializedResponseBody = JsonSerializer.Deserialize<JsonTodoChild>(responseBodyStream.ToArray(), new JsonSerializerOptions 2509var deserializedResponseBody = JsonSerializer.Deserialize<TodoStruct>(responseBodyStream.ToArray(), new JsonSerializerOptions
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
243var deserializedObject = JsonSerializer.Deserialize<T>(body, new JsonSerializerOptions()
RequestDelegateGenerator\RequestDelegateCreationTests.Responses.cs (1)
315var deserializedResponseBody = JsonSerializer.Deserialize<Todo>(((MemoryStream)httpContext.Response.Body).ToArray(), new JsonSerializerOptions
Microsoft.AspNetCore.Http.Microbenchmarks (1)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
243var deserializedObject = JsonSerializer.Deserialize<T>(body, new JsonSerializerOptions()
Microsoft.AspNetCore.Http.Results.Tests (4)
JsonResultTests.cs (1)
79var jsonOptions = new JsonSerializerOptions()
ResultsTests.cs (2)
934var options = new JsonSerializerOptions(); 953var options = new JsonSerializerOptions();
TypedResultsTests.cs (1)
829var options = new JsonSerializerOptions();
Microsoft.AspNetCore.Mvc.Core (2)
Formatters\SystemTextJsonOutputFormatter.cs (1)
42jsonSerializerOptions = new JsonSerializerOptions(jsonSerializerOptions)
JsonOptions.cs (1)
35public JsonSerializerOptions JsonSerializerOptions { get; } = new JsonSerializerOptions(JsonSerializerDefaults.Web)
Microsoft.AspNetCore.Mvc.Core.Test (2)
Infrastructure\JsonResultExecutorTestBase.cs (1)
184new JsonSerializerOptions { WriteIndented = true }));
Infrastructure\SystemTextJsonResultExecutorTest.cs (1)
38return new JsonSerializerOptions { WriteIndented = true };
Microsoft.AspNetCore.Mvc.FunctionalTests (1)
TestJsonSerializationOptionsProvider.cs (1)
10public static JsonSerializerOptions Options = new JsonSerializerOptions
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (1)
src\Mvc\Mvc.Core\test\Infrastructure\JsonResultExecutorTestBase.cs (1)
184new JsonSerializerOptions { WriteIndented = true }));
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
Rendering\SystemTextJsonHelper.cs (1)
36return new JsonSerializerOptions(serializerOptions)
Microsoft.AspNetCore.SignalR.Common.Tests (1)
Internal\Protocol\JsonHubProtocolTests.cs (1)
30PayloadSerializerOptions = new JsonSerializerOptions()
Microsoft.AspNetCore.SignalR.Protocols.Json (1)
Protocol\JsonHubProtocol.cs (1)
925return new JsonSerializerOptions()
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Rename\CSharpInlineRenameServiceTests.cs (1)
70var serializationOptions = new JsonSerializerOptions
Microsoft.CodeAnalysis.ExternalAccess.Razor (1)
Remote\RazorServiceDescriptorsWrapper.cs (1)
51var options = new JsonSerializerOptions();
Microsoft.CodeAnalysis.Features (1)
Intents\IntentDataProvider.cs (1)
17var serializerOptions = new JsonSerializerOptions
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Extensions\ProtocolConversions.cs (1)
117public static JsonSerializerOptions LspJsonSerializerOptions = new JsonSerializerOptions().AddLspSerializerOptions();
Protocol\Extensions\Converters\VSExtensionConverter.cs (1)
53options = new System.Text.Json.JsonSerializerOptions(options);
Microsoft.DotNet.Build.Tasks.Workloads (1)
Msi\WorkloadManifestMsi.wix.cs (1)
79string jsonAsString = JsonSerializer.Serialize(WorkloadPackGroups, typeof(IList<WorkloadPackGroupJson>), new JsonSerializerOptions() { WriteIndented = true });
Microsoft.DotNet.Internal.SymbolHelper (1)
SymbolPromotionHelper.cs (1)
35private static readonly JsonSerializerOptions s_options = new() { PropertyNameCaseInsensitive = true };
Microsoft.DotNet.XliffTasks (1)
Model\JsonDocument.cs (1)
16private static readonly JsonSerializerOptions s_serializerOptions = new()
Microsoft.JSInterop (1)
JSRuntime.cs (1)
31JsonSerializerOptions = new JsonSerializerOptions
Microsoft.ML.AutoML.Interactive (4)
AutoMLMonitorKernelExtension.cs (3)
25Formatter.Register<Parameter>((parameter) => JsonSerializer.Serialize(parameter, new JsonSerializerOptions() { WriteIndented = true, })); 52var bestTrialParam = JsonSerializer.Serialize(monitor.BestTrial.TrialSettings.Parameter, new JsonSerializerOptions() { WriteIndented = true, }); 61var activeTrialParam = JsonSerializer.Serialize(monitor.ActiveTrial.Parameter, new JsonSerializerOptions() { WriteIndented = true, });
NotebookMonitor.cs (1)
47var activeRunParam = JsonSerializer.Serialize(result.TrialSettings.Parameter, new JsonSerializerOptions() { WriteIndented = false, });
Microsoft.ML.AutoML.Tests (4)
AutoFeaturizerTests.cs (1)
26_jsonSerializerOptions = new JsonSerializerOptions()
SweepableEstimatorPipelineTest.cs (1)
29_jsonSerializerOptions = new JsonSerializerOptions()
SweepableExtensionTest.cs (1)
29_jsonSerializerOptions = new JsonSerializerOptions()
SweepablePipelineTests.cs (1)
26_jsonSerializerOptions = new JsonSerializerOptions()
Microsoft.ML.GenAI.Phi.Tests (1)
Phi3Tests.cs (1)
109var json = JsonSerializer.Serialize(sizeInMB, new JsonSerializerOptions { WriteIndented = true });
Microsoft.ML.SearchSpace (1)
Parameter.cs (1)
65private readonly JsonSerializerOptions _settings = new JsonSerializerOptions()
Microsoft.ML.SearchSpace.Tests (2)
ParameterTest.cs (1)
21private readonly JsonSerializerOptions _settings = new JsonSerializerOptions()
SearchSpaceTest.cs (1)
24private readonly JsonSerializerOptions _settings = new JsonSerializerOptions()
MSBuild (2)
JsonOutputFormatter.cs (1)
20private static readonly JsonSerializerOptions s_options = new() { AllowTrailingCommas = false, WriteIndented = true };
XMake.cs (1)
4645var options = new JsonSerializerOptions() { AllowTrailingCommas = false, WriteIndented = true };
System.Text.Json (3)
System\Text\Json\Nodes\JsonNode.cs (1)
18private protected static readonly JsonSerializerOptions s_defaultOptions = new();
System\Text\Json\Serialization\JsonSerializerContext.cs (1)
31options = new JsonSerializerOptions { TypeInfoResolver = this };
System\Text\Json\Serialization\JsonSerializerOptions.cs (1)
1128var options = new JsonSerializerOptions(defaults)
Wasm.Performance.Driver (1)
BenchmarkResultsStartup.cs (1)
22var result = await JsonSerializer.DeserializeAsync<BenchmarkResult>(context.Request.Body, new JsonSerializerOptions
1023 references to JsonSerializerOptions
Aspire.Dashboard (2)
Model\BrowserStorage\LocalBrowserStorage.cs (1)
12private static readonly JsonSerializerOptions s_options = new()
Otlp\Model\OtlpHelpers.cs (1)
21private static readonly JsonSerializerOptions s_jsonSerializerOptions = new JsonSerializerOptions
BasicTestApp (1)
TestJsonSerializerOptionsProvider.cs (1)
10public static JsonSerializerOptions Options { get; } = new JsonSerializerOptions
BasicWebSite (1)
Controllers\JsonResultWithSystemTextJsonController.cs (1)
11private static readonly JsonSerializerOptions _customSerializerSettings;
BasketService (1)
Repositories\RedisBasketRepository.cs (1)
12private static readonly JsonSerializerOptions s_jsonSerializerOptions = new()
ConfigurationSchemaGenerator (3)
ConfigSchemaEmitter.cs (3)
25private static readonly JsonSerializerOptions s_serializerOptions = new() 728public override void Write(Utf8JsonWriter writer, JsonNode? value, JsonSerializerOptions options) 764public override JsonNode? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
ConfigurationSchemaGenerator.Tests (1)
GeneratorTests.cs (1)
52private static readonly JsonSerializerOptions s_testSerializerOptions = new() { WriteIndented = true };
dotnet-user-jwts (1)
Helpers\JwtSerializerOptions.cs (1)
10public static JsonSerializerOptions Default { get; } = new()
Microsoft.AspNetCore.Authentication.Core.Test (1)
AuthenticationPropertiesTests.cs (1)
375var options = new JsonSerializerOptions() { WriteIndented = true }; // Indented for readability if test fails
Microsoft.AspNetCore.Components (1)
src\Components\Shared\src\JsonSerializerOptionsProvider.cs (1)
10public static readonly JsonSerializerOptions Options = new()
Microsoft.AspNetCore.Components.Endpoints (2)
src\Shared\Components\ServerComponentSerializationSettings.cs (1)
13public static readonly JsonSerializerOptions JsonSerializationOptions =
src\Shared\Components\WebAssemblyComponentSerializationSettings.cs (1)
11public static readonly JsonSerializerOptions JsonSerializationOptions =
Microsoft.AspNetCore.Components.Server (5)
Circuits\RemoteJSRuntime.cs (1)
53public JsonSerializerOptions ReadJsonSerializerOptions() => JsonSerializerOptions;
src\Components\Shared\src\ElementReferenceJsonConverter.cs (2)
20public override ElementReference Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 51public override void Write(Utf8JsonWriter writer, ElementReference value, JsonSerializerOptions options)
src\Components\Shared\src\JsonSerializerOptionsProvider.cs (1)
10public static readonly JsonSerializerOptions Options = new()
src\Shared\Components\ServerComponentSerializationSettings.cs (1)
13public static readonly JsonSerializerOptions JsonSerializationOptions =
Microsoft.AspNetCore.Components.Web (11)
JSComponents\JSComponentInterop.cs (1)
81protected internal void SetRootComponentParameters(int componentId, int parameterCount, JsonElement parametersJson, JsonSerializerOptions jsonOptions)
src\Components\Shared\src\JsonSerialization\JsonConverterFactoryTypeInfoResolver.cs (1)
21public JsonTypeInfo? GetTypeInfo(Type type, JsonSerializerOptions options)
WebEventData\WebEventData.cs (3)
18JsonSerializerOptions jsonSerializerOptions, 37JsonSerializerOptions jsonSerializerOptions, 65JsonSerializerOptions jsonSerializerOptions,
WebRenderer.cs (6)
30/// <param name="jsonOptions">The <see cref="JsonSerializerOptions"/>.</param> 35JsonSerializerOptions jsonOptions, 104private void AttachWebRendererInterop(IJSRuntime jsRuntime, JsonSerializerOptions jsonOptions, JSComponentInterop jsComponentInterop) 128var newJsonOptions = new JsonSerializerOptions(jsonOptions); 149private readonly JsonSerializerOptions _jsonOptions; 153public WebRendererInteropMethods(WebRenderer renderer, JsonSerializerOptions jsonOptions, JSComponentInterop jsComponentInterop)
Microsoft.AspNetCore.Components.WebAssembly (5)
Services\DefaultWebAssemblyJSRuntime.cs (1)
40public JsonSerializerOptions ReadJsonSerializerOptions() => JsonSerializerOptions;
src\Components\Shared\src\ElementReferenceJsonConverter.cs (2)
20public override ElementReference Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 51public override void Write(Utf8JsonWriter writer, ElementReference value, JsonSerializerOptions options)
src\Components\Shared\src\JsonSerializerOptionsProvider.cs (1)
10public static readonly JsonSerializerOptions Options = new()
src\Shared\Components\WebAssemblyComponentSerializationSettings.cs (1)
11public static readonly JsonSerializerOptions JsonSerializationOptions =
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
TargetPickerUi.cs (1)
22private static readonly JsonSerializerOptions JsonOptions = new JsonSerializerOptions
Microsoft.AspNetCore.Components.WebAssembly.Tests (1)
JSObjectReferenceJsonConverterTest.cs (1)
13private readonly JsonSerializerOptions JsonSerializerOptions;
Microsoft.AspNetCore.Components.WebView (6)
Services\WebViewJSRuntime.cs (1)
29public JsonSerializerOptions ReadJsonSerializerOptions() => JsonSerializerOptions;
src\Components\Shared\src\ElementReferenceJsonConverter.cs (2)
20public override ElementReference Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 51public override void Write(Utf8JsonWriter writer, ElementReference value, JsonSerializerOptions options)
src\Components\Shared\src\JsonSerializerOptionsProvider.cs (1)
10public static readonly JsonSerializerOptions Options = new()
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (2)
374public override Dictionary<string, StaticWebAssetNode> Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 433public override void Write(Utf8JsonWriter writer, Dictionary<string, StaticWebAssetNode> value, JsonSerializerOptions options)
Microsoft.AspNetCore.Grpc.JsonTranscoding (56)
GrpcJsonTranscodingOptions.cs (6)
16private readonly Lazy<JsonSerializerOptions> _unaryOptions; 17private readonly Lazy<JsonSerializerOptions> _serverStreamingOptions; 21_unaryOptions = new Lazy<JsonSerializerOptions>( 24_serverStreamingOptions = new Lazy<JsonSerializerOptions>( 29internal JsonSerializerOptions UnarySerializerOptions => _unaryOptions.Value; 30internal JsonSerializerOptions ServerStreamingSerializerOptions => _serverStreamingOptions.Value;
Internal\CallHandlers\ServerCallHandlerBase.cs (3)
22public JsonSerializerOptions SerializerOptions { get; } 29JsonSerializerOptions serializerOptions) 67static async Task AwaitHandleCall(JsonTranscodingServerCallContext serverCallContext, Method<TRequest, TResponse> method, bool isStreaming, JsonSerializerOptions serializerOptions, Task handleCall)
Internal\CallHandlers\ServerStreamingServerCallHandler.cs (1)
22JsonSerializerOptions options) : base(unaryMethodInvoker, loggerFactory, descriptorInfo, options)
Internal\CallHandlers\UnaryServerCallHandler.cs (1)
24JsonSerializerOptions options) : base(unaryMethodInvoker, loggerFactory, descriptorInfo, options)
Internal\HttpContextStreamWriter.cs (2)
14private readonly JsonSerializerOptions _serializerOptions; 19public HttpContextStreamWriter(JsonTranscodingServerCallContext context, JsonSerializerOptions serializerOptions)
Internal\Json\AnyConverter.cs (3)
21public override TMessage? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 64public override void Write(Utf8JsonWriter writer, TMessage value, JsonSerializerOptions options) 104internal static void WriteMessageFields(Utf8JsonWriter writer, IMessage message, GrpcJsonSettings settings, JsonSerializerOptions options)
Internal\Json\BoolConverter.cs (3)
12public override bool Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 17public override void Write(Utf8JsonWriter writer, bool value, JsonSerializerOptions options) 22public override void WriteAsPropertyName(Utf8JsonWriter writer, bool value, JsonSerializerOptions options)
Internal\Json\ByteStringConverter.cs (2)
13public override ByteString? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 19public override void Write(Utf8JsonWriter writer, ByteString value, JsonSerializerOptions options)
Internal\Json\DurationConverter.cs (2)
18public override TMessage? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 41public override void Write(Utf8JsonWriter writer, TMessage value, JsonSerializerOptions options)
Internal\Json\EnumConverter.cs (2)
19public override TEnum? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 47public override void Write(Utf8JsonWriter writer, TEnum value, JsonSerializerOptions options)
Internal\Json\FieldMaskConverter.cs (2)
20public override TMessage? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 40public override void Write(Utf8JsonWriter writer, TMessage value, JsonSerializerOptions options)
Internal\Json\Int64Converter.cs (2)
16public override long Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 26public override void Write(Utf8JsonWriter writer, long value, JsonSerializerOptions options)
Internal\Json\JsonConverterFactoryForEnum.cs (1)
26Type typeToConvert, JsonSerializerOptions options)
Internal\Json\JsonConverterFactoryForWellKnownTypes.cs (1)
38Type typeToConvert, JsonSerializerOptions options)
Internal\Json\JsonConverterFactoryForWrappers.cs (1)
39Type typeToConvert, JsonSerializerOptions options)
Internal\Json\JsonConverterHelper.cs (4)
34internal static JsonSerializerOptions CreateSerializerOptions(JsonContext context, bool isStreamingOptions = false) 44var options = new JsonSerializerOptions 129public static void PopulateMap(ref Utf8JsonReader reader, JsonSerializerOptions options, IMessage message, FieldDescriptor fieldDescriptor) 148public static void PopulateList(ref Utf8JsonReader reader, JsonSerializerOptions options, IMessage message, FieldDescriptor fieldDescriptor)
Internal\Json\ListValueConverter.cs (2)
18public override TMessage? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 26public override void Write(Utf8JsonWriter writer, TMessage value, JsonSerializerOptions options)
Internal\Json\MessageTypeInfoResolver.cs (1)
26public JsonTypeInfo? GetTypeInfo(Type type, JsonSerializerOptions options)
Internal\Json\NullValueConverter.cs (2)
15public override NullValue Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 37public override void Write(Utf8JsonWriter writer, NullValue value, JsonSerializerOptions options)
Internal\Json\StructConverter.cs (2)
18public override TMessage? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 26public override void Write(Utf8JsonWriter writer, TMessage value, JsonSerializerOptions options)
Internal\Json\TimestampConverter.cs (2)
18public override TMessage? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 40public override void Write(Utf8JsonWriter writer, TMessage value, JsonSerializerOptions options)
Internal\Json\UInt64Converter.cs (2)
17public override ulong Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 27public override void Write(Utf8JsonWriter writer, ulong value, JsonSerializerOptions options)
Internal\Json\ValueConverter.cs (2)
19public override TMessage? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 63public override void Write(Utf8JsonWriter writer, TMessage value, JsonSerializerOptions options)
Internal\Json\WrapperConverter.cs (2)
16public override TMessage? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 27public override void Write(Utf8JsonWriter writer, TMessage value, JsonSerializerOptions options)
Internal\JsonRequestHelpers.cs (4)
87public static async ValueTask SendErrorResponse(HttpResponse response, Encoding encoding, Metadata trailers, Status status, JsonSerializerOptions options) 166public static async ValueTask WriteResponseMessage(HttpResponse response, Encoding encoding, object responseBody, JsonSerializerOptions options, CancellationToken cancellationToken) 183public static async ValueTask<TRequest> ReadMessage<TRequest>(JsonTranscodingServerCallContext serverCallContext, JsonSerializerOptions serializerOptions) where TRequest : class 371public static async ValueTask SendMessage<TResponse>(JsonTranscodingServerCallContext serverCallContext, JsonSerializerOptions serializerOptions, TResponse message, CancellationToken cancellationToken) where TResponse : class
Internal\JsonTranscodingServerCallContext.cs (1)
102internal async Task ProcessHandlerErrorAsync(Exception ex, string method, bool isStreaming, JsonSerializerOptions options)
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (7)
ConverterTests\JsonConverterReadTests.cs (3)
652var jsonSerializerOptions = CreateSerializerOptions(settings, typeRegistery, descriptorRegistry); 680var jsonSerializerOptions = CreateSerializerOptions(settings, typeRegistery, descriptorRegistry); 696internal static JsonSerializerOptions CreateSerializerOptions(GrpcJsonSettings? settings, TypeRegistry? typeRegistery, DescriptorRegistry descriptorRegistry)
ConverterTests\JsonConverterWriteTests.cs (4)
229var jsonSerializerOptions = CreateSerializerOptions(settings, TypeRegistry.Empty, descriptorRegistry); 244var jsonSerializerOptions = CreateSerializerOptions(settings, TypeRegistry.Empty, descriptorRegistry); 540var jsonSerializerOptions = CreateSerializerOptions(settings, typeRegistery, descriptorRegistry); 562internal static JsonSerializerOptions CreateSerializerOptions(GrpcJsonSettings? settings, TypeRegistry? typeRegistery, DescriptorRegistry descriptorRegistry)
Microsoft.AspNetCore.Grpc.Microbenchmarks (2)
Json\JsonReading.cs (1)
18private JsonSerializerOptions _serializerOptions = default!;
Json\JsonWriting.cs (1)
18private JsonSerializerOptions _serializerOptions = default!;
Microsoft.AspNetCore.Grpc.Swagger (1)
GrpcSwaggerServiceExtensions.cs (1)
50var serializerOptions = s.GetService<IOptions<JsonOptions>>()?.Value?.JsonSerializerOptions ?? new JsonSerializerOptions();
Microsoft.AspNetCore.Hosting (2)
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (2)
374public override Dictionary<string, StaticWebAssetNode> Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 433public override void Write(Utf8JsonWriter writer, Dictionary<string, StaticWebAssetNode> value, JsonSerializerOptions options)
Microsoft.AspNetCore.Http.Abstractions.Tests (3)
HttpValidationProblemDetailsJsonConverterTest.cs (1)
12private static JsonSerializerOptions JsonSerializerOptions => new JsonOptions().SerializerOptions;
ProblemDetailsJsonConverterTest.cs (2)
14private static JsonSerializerOptions JsonSerializerOptions => new JsonOptions().SerializerOptions; 106var serializerOptions = new JsonSerializerOptions(JsonSerializerOptions) { UnknownTypeHandling = System.Text.Json.Serialization.JsonUnknownTypeHandling.JsonNode };
Microsoft.AspNetCore.Http.Extensions (19)
DefaultProblemDetailsWriter.cs (1)
18private readonly JsonSerializerOptions _serializerOptions;
HttpRequestJsonExtensions.cs (5)
41var options = ResolveSerializerOptions(request.HttpContext); 58JsonSerializerOptions? options, 177var options = ResolveSerializerOptions(request.HttpContext); 195JsonSerializerOptions? options, 303private static JsonSerializerOptions ResolveSerializerOptions(HttpContext httpContext)
HttpResponseJsonExtensions.cs (7)
61JsonSerializerOptions? options, 83JsonSerializerOptions? options, 190JsonSerializerOptions? options, 238JsonSerializerOptions? options, 261JsonSerializerOptions? options, 288JsonSerializerOptions? options, 342private static JsonSerializerOptions ResolveSerializerOptions(HttpContext httpContext)
JsonOptions.cs (3)
16internal static readonly JsonSerializerOptions DefaultSerializerOptions = new JsonSerializerOptions(JsonSerializerDefaults.Web) 32/// Gets the <see cref="JsonSerializerOptions"/>. 34public JsonSerializerOptions SerializerOptions { get; } = new JsonSerializerOptions(DefaultSerializerOptions);
RequestDelegateFactory.cs (1)
276var jsonSerializerOptions = serviceProvider.GetService<IOptions<JsonOptions>>()?.Value.SerializerOptions ?? JsonOptions.DefaultSerializerOptions;
RequestDelegateFactoryContext.cs (1)
65public required JsonSerializerOptions JsonSerializerOptions { get; set; }
src\Shared\Json\JsonSerializerExtensions.cs (1)
19public static JsonTypeInfo GetReadOnlyTypeInfo(this JsonSerializerOptions options, Type type)
Microsoft.AspNetCore.Http.Extensions.Tests (17)
HttpRequestJsonExtensionsTests.cs (4)
87var options = new JsonSerializerOptions(); 219var options = new JsonSerializerOptions(); 240var options = new JsonSerializerOptions(); 262var options = new JsonSerializerOptions();
HttpResponseJsonExtensionsTests.cs (5)
66var options = new JsonSerializerOptions(); 79public override int Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 84public override void Write(Utf8JsonWriter writer, int value, JsonSerializerOptions options) 454var options = new JsonSerializerOptions(); 475var options = new JsonSerializerOptions();
JsonOptionsTests.cs (2)
23var options = JsonOptions.DefaultSerializerOptions; 41var options = JsonOptions.DefaultSerializerOptions;
ProblemDetailsDefaultWriterTest.cs (3)
19private static readonly JsonSerializerOptions SerializerOptions = JsonOptions.DefaultSerializerOptions; 87var result = await JsonSerializer.DeserializeAsync<Dictionary<string, object>>(stream, JsonSerializerOptions.Default); 119var result = await JsonSerializer.DeserializeAsync<Dictionary<string, object>>(stream, JsonSerializerOptions.Default);
ProblemDetailsServiceCollectionExtensionsTest.cs (1)
253public JsonTypeInfo GetTypeInfo(Type type, JsonSerializerOptions options)
RequestDelegateGenerator\SharedTypes.cs (2)
985public override ITodo Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 1017public override void Write(Utf8JsonWriter writer, ITodo value, JsonSerializerOptions options)
Microsoft.AspNetCore.Http.Microbenchmarks (2)
src\Http\Http.Extensions\test\RequestDelegateGenerator\SharedTypes.cs (2)
985public override ITodo Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 1017public override void Write(Utf8JsonWriter writer, ITodo value, JsonSerializerOptions options)
Microsoft.AspNetCore.Http.Results (7)
HttpResultsHelper.cs (1)
30JsonSerializerOptions? jsonSerializerOptions = null)
JsonHttpResultOfT.cs (2)
27internal JsonHttpResult(TValue? value, JsonSerializerOptions? jsonSerializerOptions, int? statusCode = null, string? contentType = null) 64public JsonSerializerOptions? JsonSerializerOptions { get; }
Results.cs (2)
185public static IResult Json(object? data, JsonSerializerOptions? options = null, string? contentType = null, int? statusCode = null) 241public static IResult Json<TValue>(TValue? data, JsonSerializerOptions? options = null, string? contentType = null, int? statusCode = null)
src\Shared\Json\JsonSerializerExtensions.cs (1)
19public static JsonTypeInfo GetReadOnlyTypeInfo(this JsonSerializerOptions options, Type type)
TypedResults.cs (1)
199public static JsonHttpResult<TValue> Json<TValue>(TValue? data, JsonSerializerOptions? options = null, string? contentType = null, int? statusCode = null)
Microsoft.AspNetCore.Http.Results.Tests (23)
HttpResultsHelperTests.cs (6)
29var serializerOptions = new JsonOptions().SerializerOptions; 60var serializerOptions = new JsonOptions().SerializerOptions; 93var serializerOptions = new JsonOptions().SerializerOptions; 127var serializerOptions = new JsonOptions().SerializerOptions; 161var serializerOptions = new JsonOptions().SerializerOptions; 189var serializerOptions = new JsonOptions().SerializerOptions;
JsonResultTests.cs (6)
79var jsonOptions = new JsonSerializerOptions() 118var result = new JsonHttpResult<ProblemDetails>(details, jsonSerializerOptions: JsonSerializerOptions.Web); 135var responseDetails = JsonSerializer.Deserialize<ProblemDetails>(stream, JsonSerializerOptions.Web); 147var result = new JsonHttpResult<HttpValidationProblemDetails>(details, jsonSerializerOptions: JsonSerializerOptions.Web); 164var responseDetails = JsonSerializer.Deserialize<HttpValidationProblemDetails>(stream, JsonSerializerOptions.Web); 196var responseDetails = JsonSerializer.Deserialize<HttpValidationProblemDetails>(stream, JsonSerializerOptions.Web);
ProblemResultTests.cs (5)
38var responseDetails = JsonSerializer.Deserialize<ProblemDetails>(stream, JsonSerializerOptions.Web); 70var responseDetails = JsonSerializer.Deserialize<ProblemDetails>(stream, JsonSerializerOptions.Web); 99var responseDetails = JsonSerializer.Deserialize<HttpValidationProblemDetails>(stream, JsonSerializerOptions.Web); 131var responseDetails = JsonSerializer.Deserialize<HttpValidationProblemDetails>(stream, JsonSerializerOptions.Web); 163var responseDetails = JsonSerializer.Deserialize<HttpValidationProblemDetails>(stream, JsonSerializerOptions.Web);
ResultsTests.cs (3)
934var options = new JsonSerializerOptions(); 953var options = new JsonSerializerOptions(); 1759(() => Results.Json(new(), (JsonSerializerOptions)null, null, null), typeof(JsonHttpResult<object>)),
TypedResultsTests.cs (1)
829var options = new JsonSerializerOptions();
ValidationProblemResultTests.cs (2)
42var responseDetails = JsonSerializer.Deserialize<ProblemDetails>(stream, JsonSerializerOptions.Web); 74var responseDetails = JsonSerializer.Deserialize<ProblemDetails>(stream, JsonSerializerOptions.Web);
Microsoft.AspNetCore.Mvc.Core (16)
Formatters\SystemTextJsonInputFormatter.cs (2)
41/// Gets the <see cref="JsonSerializerOptions"/> used to configure the <see cref="JsonSerializer"/>. 47public JsonSerializerOptions SerializerOptions { get; }
Formatters\SystemTextJsonOutputFormatter.cs (5)
21/// <param name="jsonSerializerOptions">The <see cref="JsonSerializerOptions"/>.</param> 22public SystemTextJsonOutputFormatter(JsonSerializerOptions jsonSerializerOptions) 37var jsonSerializerOptions = jsonOptions.JsonSerializerOptions; 52/// Gets the <see cref="JsonSerializerOptions"/> used to configure the <see cref="JsonSerializer"/>. 58public JsonSerializerOptions SerializerOptions { get; }
Infrastructure\SystemTextJsonResultExecutor.cs (4)
39var jsonSerializerOptions = GetSerializerOptions(result); 109private JsonSerializerOptions GetSerializerOptions(JsonResult result) 118if (serializerSettings is not JsonSerializerOptions settingsFromResult) 123typeof(JsonSerializerOptions)));
JsonOptions.cs (2)
32/// Gets the <see cref="System.Text.Json.JsonSerializerOptions"/> used by <see cref="SystemTextJsonInputFormatter"/> and 35public JsonSerializerOptions JsonSerializerOptions { get; } = new JsonSerializerOptions(JsonSerializerDefaults.Web)
JsonResult.cs (2)
31/// When using <c>System.Text.Json</c>, this should be an instance of <see cref="JsonSerializerOptions" />. 51/// When using <c>System.Text.Json</c>, this should be an instance of <see cref="JsonSerializerOptions" />
src\Shared\Json\JsonSerializerExtensions.cs (1)
19public static JsonTypeInfo GetReadOnlyTypeInfo(this JsonSerializerOptions options, Type type)
Microsoft.AspNetCore.Mvc.Core.Test (15)
Formatters\SystemTextJsonInputFormatterTest.cs (4)
223public override short Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 228public override void Write(Utf8JsonWriter writer, short value, JsonSerializerOptions options) 236public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 241public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options)
Formatters\SystemTextJsonOutputFormatterTest.cs (3)
91await JsonSerializer.SerializeAsync(expected, LargeAsync(), JsonSerializerOptions.Web); 324public override ThrowingFormatterModel Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 329public override void Write(Utf8JsonWriter writer, ThrowingFormatterModel value, JsonSerializerOptions options)
Infrastructure\DefaultApiProblemDetailsWriterTest.cs (2)
45var problemDetails = await JsonSerializer.DeserializeAsync<ProblemDetails>(stream, JsonSerializerOptions.Web); 84var problemDetails = await JsonSerializer.DeserializeAsync<ProblemDetails>(stream, JsonSerializerOptions.Web);
Infrastructure\SystemTextJsonResultExecutorTest.cs (2)
49public override ThrowingFormatterModel Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 54public override void Write(Utf8JsonWriter writer, ThrowingFormatterModel value, JsonSerializerOptions options)
Infrastructure\ValidationProblemDetailsJsonConverterTest.cs (2)
12private static JsonSerializerOptions JsonSerializerOptions => new JsonOptions().JsonSerializerOptions; 179var options = new JsonOptions().JsonSerializerOptions;
JsonOptionsTest.cs (2)
22var options = new JsonOptions().JsonSerializerOptions; 40var options = new JsonOptions().JsonSerializerOptions;
Microsoft.AspNetCore.Mvc.FunctionalTests (1)
TestJsonSerializationOptionsProvider.cs (1)
10public static JsonSerializerOptions Options = new JsonSerializerOptions
Microsoft.AspNetCore.Mvc.ViewFeatures (4)
Controller.cs (1)
301/// When using <c>System.Text.Json</c>, this should be an instance of <see cref="JsonSerializerOptions" />.
Rendering\SystemTextJsonHelper.cs (3)
13private readonly JsonSerializerOptions _htmlSafeJsonSerializerOptions; 29private static JsonSerializerOptions GetHtmlSafeSerializerOptions(JsonSerializerOptions serializerOptions)
Microsoft.AspNetCore.OpenApi (6)
Extensions\JsonTypeInfoExtensions.cs (1)
85internal static string GetSchemaReferenceId(this Type type, JsonSerializerOptions options)
Schemas\OpenApiJsonSchema.cs (2)
18public override OpenApiJsonSchema? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 48public override void Write(Utf8JsonWriter writer, OpenApiJsonSchema value, JsonSerializerOptions options)
Schemas\OpenApiJsonSchema.Helpers.cs (2)
176/// <param name="options">The <see cref="JsonSerializerOptions"/> instance.</param> 177public static void ReadProperty(ref Utf8JsonReader reader, string propertyName, OpenApiSchema schema, JsonSerializerOptions options)
Services\Schemas\OpenApiSchemaService.cs (1)
36private readonly JsonSerializerOptions _jsonSerializerOptions = new(jsonOptions.Value.SerializerOptions)
Microsoft.AspNetCore.OpenApi.Tests (3)
Extensions\JsonTypeInfoExtensionsTests.cs (1)
67var jsonTypeInfo = JsonSerializerOptions.Default.GetTypeInfo(type);
Services\OpenApiSchemaService\OpenApiSchemaService.ParameterSchemas.cs (2)
567public override CustomType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 572public override void Write(Utf8JsonWriter writer, CustomType value, JsonSerializerOptions options)
Microsoft.AspNetCore.Routing (2)
RequestDelegateFilterPipelineBuilder.cs (1)
23var jsonSerializerOptions = jsonOptions.SerializerOptions;
src\Shared\Json\JsonSerializerExtensions.cs (1)
19public static JsonTypeInfo GetReadOnlyTypeInfo(this JsonSerializerOptions options, Type type)
Microsoft.AspNetCore.Routing.FunctionalTests (5)
MinimalFormTests.cs (5)
67var result = JsonSerializer.Deserialize<Todo>(body, JsonSerializerOptions.Web); 127var result = JsonSerializer.Deserialize<Todo>(body, JsonSerializerOptions.Web); 288var result = JsonSerializer.Deserialize<Todo>(body, JsonSerializerOptions.Web); 335var result = JsonSerializer.Deserialize<Todo>(body, JsonSerializerOptions.Web); 495var result = JsonSerializer.Deserialize<Todo>(body, JsonSerializerOptions.Web);
Microsoft.AspNetCore.SignalR.Protocols.Json (3)
JsonHubProtocolOptions.cs (1)
17public JsonSerializerOptions PayloadSerializerOptions { get; set; } = JsonHubProtocol.CreateDefaultSerializerSettings();
Protocol\JsonHubProtocol.cs (2)
55private readonly JsonSerializerOptions _payloadSerializerOptions; 923internal static JsonSerializerOptions CreateDefaultSerializerSettings()
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Rename\CSharpInlineRenameServiceTests.cs (1)
70var serializationOptions = new JsonSerializerOptions
Microsoft.CodeAnalysis.EditorFeatures (1)
LanguageServer\AbstractInProcLanguageClient.cs (1)
239JsonSerializerOptions options,
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
LanguageServer\AbstractLanguageServerProtocolTests.cs (1)
45protected static readonly JsonSerializerOptions JsonSerializerOptions = RoslynLanguageServer.CreateJsonMessageFormatter().JsonSerializerOptions;
Microsoft.CodeAnalysis.ExternalAccess.Razor (9)
Remote\RazorServiceDescriptorsWrapper.cs (1)
51var options = new JsonSerializerOptions();
Testing\AbstractRazorLanguageServerFactoryWrapper.cs (2)
18internal abstract IRazorLanguageServerTarget CreateLanguageServer(JsonRpc jsonRpc, JsonSerializerOptions options, IRazorTestCapabilitiesProvider capabilitiesProvider, HostServices hostServices); 34internal abstract void AddJsonConverters(JsonSerializerOptions options);
Testing\RazorTestLanguageServerFactory.cs (6)
27internal override IRazorLanguageServerTarget CreateLanguageServer(JsonRpc jsonRpc, JsonSerializerOptions options, IRazorTestCapabilitiesProvider razorCapabilitiesProvider, HostServices hostServices) 32internal IRazorLanguageServerTarget CreateAlwaysActiveVSLanguageServer(JsonRpc jsonRpc, JsonSerializerOptions options, IRazorTestCapabilitiesProvider razorCapabilitiesProvider, HostServices hostServices) 37private IRazorLanguageServerTarget CreateLanguageServerCore(JsonRpc jsonRpc, JsonSerializerOptions options, IRazorTestCapabilitiesProvider razorCapabilitiesProvider, HostServices hostServices, WellKnownLspServerKinds serverKind) 69internal override void AddJsonConverters(JsonSerializerOptions options) 77private readonly JsonSerializerOptions _options; 79public RazorCapabilitiesProvider(IRazorTestCapabilitiesProvider razorTestCapabilitiesProvider, JsonSerializerOptions options)
Microsoft.CodeAnalysis.Features (3)
Intents\IntentDataProvider.cs (3)
15private static readonly Lazy<JsonSerializerOptions> s_serializerOptions = new Lazy<JsonSerializerOptions>(() => 17var serializerOptions = new JsonSerializerOptions
Microsoft.CodeAnalysis.LanguageServer.Protocol (52)
CSharpVisualBasicLanguageServerFactory.cs (1)
31JsonSerializerOptions options,
Extensions\ProtocolConversions.cs (3)
105public static JsonSerializerOptions AddLspSerializerOptions(this JsonSerializerOptions options) 117public static JsonSerializerOptions LspJsonSerializerOptions = new JsonSerializerOptions().AddLspSerializerOptions();
ILanguageServerFactory.cs (1)
17JsonSerializerOptions options,
Protocol\Converters\DocumentUriConverter.cs (2)
16public override Uri Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 19public override void Write(Utf8JsonWriter writer, Uri value, JsonSerializerOptions options)
Protocol\Converters\FormattingOptionsConverter.cs (2)
19public override FormattingOptions? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 115public override void Write(Utf8JsonWriter writer, FormattingOptions value, JsonSerializerOptions options)
Protocol\Converters\InitializeParamsWorkspaceFoldersConverter.cs (2)
29public override WorkspaceFolder[]? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 34public override void Write(Utf8JsonWriter writer, WorkspaceFolder[]? value, JsonSerializerOptions options)
Protocol\Converters\NaturalObjectConverter.cs (2)
15public override object? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 18public override void Write(Utf8JsonWriter writer, object value, JsonSerializerOptions options)
Protocol\Converters\ParameterInformationConverter.cs (2)
16public override ParameterInformation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 43public override void Write(Utf8JsonWriter writer, ParameterInformation value, JsonSerializerOptions options)
Protocol\Converters\StringEnumConverter.cs (2)
38public override TStringEnumType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 52public override void Write(Utf8JsonWriter writer, TStringEnumType value, JsonSerializerOptions options)
Protocol\Converters\SumConverter.cs (6)
23public override JsonConverter? CreateConverter(Type typeToConvert, JsonSerializerOptions options) 126internal delegate T StjReader<T>(ref Utf8JsonReader reader, JsonSerializerOptions options); 139private static readonly Type[] jsonSerializerDeserializeMethodTypes = [typeof(Utf8JsonReader).MakeByRefType(), typeof(JsonSerializerOptions)]; 157var param2 = Expression.Parameter(typeof(JsonSerializerOptions), "options"); 186public override T Read(ref Utf8JsonReader reader, Type objectType, JsonSerializerOptions options) 257public override void Write(Utf8JsonWriter writer, T value, JsonSerializerOptions options)
Protocol\Converters\TextDocumentSyncConverter.cs (2)
14public override TextDocumentSyncOptions Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 45public override void Write(Utf8JsonWriter writer, TextDocumentSyncOptions value, JsonSerializerOptions options)
Protocol\Extensions\Converters\VSExtensionConverter.cs (5)
21private JsonSerializerOptions? _trimmedOptions; 23public override TBase? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 28public override void Write(Utf8JsonWriter writer, TBase value, JsonSerializerOptions options) 44private JsonSerializerOptions DropConverter(JsonSerializerOptions options)
Protocol\Extensions\Converters\VSExtensionUtilities.cs (1)
24internal static void AddVSExtensionConverters(this JsonSerializerOptions options)
Protocol\Internal\Converters\ClassifiedTextElementConverter.cs (2)
16public override ClassifiedTextElement Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 57public override void Write(Utf8JsonWriter writer, ClassifiedTextElement value, JsonSerializerOptions options)
Protocol\Internal\Converters\ClassifiedTextRunConverter.cs (2)
15public override ClassifiedTextRun? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 37public override void Write(Utf8JsonWriter writer, ClassifiedTextRun value, JsonSerializerOptions options)
Protocol\Internal\Converters\ContainerElementConverter.cs (2)
19public override ContainerElement Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 67public override void Write(Utf8JsonWriter writer, ContainerElement value, JsonSerializerOptions options)
Protocol\Internal\Converters\ImageElementConverter.cs (2)
16public override ImageElement Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 58public override void Write(Utf8JsonWriter writer, ImageElement value, JsonSerializerOptions options)
Protocol\Internal\Converters\ImageIdConverter.cs (2)
15public override ImageId Read(ref Utf8JsonReader reader, Type objectType, JsonSerializerOptions options) 36public override void Write(Utf8JsonWriter writer, ImageId value, JsonSerializerOptions options)
Protocol\Internal\Converters\ObjectContentConverter.cs (2)
38public override object? Read(ref Utf8JsonReader reader, Type objectType, JsonSerializerOptions options) 83public override void Write(Utf8JsonWriter writer, object? value, JsonSerializerOptions options)
Protocol\Internal\Converters\RegexConverter.cs (2)
18public override Regex? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 23public override void Write(Utf8JsonWriter writer, Regex value, JsonSerializerOptions options)
Protocol\Internal\Converters\VSInternalExtensionUtilities.cs (1)
21internal static void AddVSInternalExtensionConverters(this JsonSerializerOptions options)
Protocol\Internal\Efficiency\OptimizedVSCompletionListJsonConverter.cs (3)
19public override OptimizedVSCompletionList Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => throw new NotImplementedException(); 21public override void Write(Utf8JsonWriter writer, OptimizedVSCompletionList value, JsonSerializerOptions options) 96private static void WriteCompletionItem(Utf8JsonWriter writer, CompletionItem completionItem, JsonSerializerOptions options, Dictionary<object, string> itemRawJsonCache)
RoslynLanguageServer.cs (1)
32JsonSerializerOptions serializerOptions,
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\SystemTextJsonLanguageServer.cs (2)
19JsonRpc jsonRpc, JsonSerializerOptions options, ILspLogger logger, AbstractTypeRefResolver? typeRefResolver = null) 26private readonly JsonSerializerOptions _jsonSerializerOptions = options;
Microsoft.CommonLanguageServerProtocol.Framework.Package (2)
SystemTextJsonLanguageServer.cs (2)
19JsonRpc jsonRpc, JsonSerializerOptions options, ILspLogger logger, AbstractTypeRefResolver? typeRefResolver = null) 26private readonly JsonSerializerOptions _jsonSerializerOptions = options;
Microsoft.CommonLanguageServerProtocol.Framework.UnitTests (1)
TestExampleLanguageServer.cs (1)
23public TestExampleLanguageServer(Stream clientSteam, JsonRpc jsonRpc, JsonSerializerOptions options, ILspLogger logger, Action<IServiceCollection>? addExtraHandlers)
Microsoft.DotNet.Internal.SymbolHelper (1)
SymbolPromotionHelper.cs (1)
35private static readonly JsonSerializerOptions s_options = new() { PropertyNameCaseInsensitive = true };
Microsoft.DotNet.XliffTasks (1)
Model\JsonDocument.cs (1)
16private static readonly JsonSerializerOptions s_serializerOptions = new()
Microsoft.Extensions.Caching.Hybrid (1)
Internal\DefaultJsonSerializerFactory.cs (1)
36JsonSerializer.Serialize<T>(writer, value, JsonSerializerOptions.Default);
Microsoft.JSInterop (13)
Infrastructure\ByteArrayJsonConverter.cs (2)
23public override byte[]? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 77public override void Write(Utf8JsonWriter writer, byte[] value, JsonSerializerOptions options)
Infrastructure\DotNetObjectReferenceJsonConverter.cs (2)
22public override DotNetObjectReference<TValue> Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 55public override void Write(Utf8JsonWriter writer, DotNetObjectReference<TValue> value, JsonSerializerOptions options)
Infrastructure\DotNetObjectReferenceJsonConverterFactory.cs (1)
25public override JsonConverter CreateConverter(Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
Infrastructure\DotNetStreamReferenceJsonConverter.cs (2)
20public override DotNetStreamReference Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 23public override void Write(Utf8JsonWriter writer, DotNetStreamReference value, JsonSerializerOptions options)
Infrastructure\JSObjectReferenceJsonConverter.cs (2)
22public override IJSObjectReference? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 28public override void Write(Utf8JsonWriter writer, IJSObjectReference value, JsonSerializerOptions options)
Infrastructure\JSStreamReferenceJsonConverter.cs (2)
24public override IJSStreamReference? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 67public override void Write(Utf8JsonWriter writer, IJSStreamReference value, JsonSerializerOptions options)
JSRuntime.cs (2)
48/// Gets the <see cref="System.Text.Json.JsonSerializerOptions"/> used to serialize and deserialize interop payloads. 50protected internal JsonSerializerOptions JsonSerializerOptions { get; }
Microsoft.JSInterop.Tests (5)
Infrastructure\ByteArrayJsonConverterTest.cs (1)
11private JsonSerializerOptions JsonSerializerOptions => JSRuntime.JsonSerializerOptions;
Infrastructure\DotNetObjectReferenceJsonConverterTest.cs (1)
11private JsonSerializerOptions JsonSerializerOptions => JSRuntime.JsonSerializerOptions;
Infrastructure\DotNetStreamReferenceJsonConverterTest.cs (1)
11private readonly JsonSerializerOptions JsonSerializerOptions;
Infrastructure\JSObjectReferenceJsonConverterTest.cs (1)
12private readonly JsonSerializerOptions JsonSerializerOptions;
Infrastructure\JSStreamReferenceJsonConverterTest.cs (1)
12private readonly JsonSerializerOptions JsonSerializerOptions;
Microsoft.JSInterop.WebAssembly (2)
WebAssemblyJSObjectReferenceJsonConverter.cs (2)
26public override IJSObjectReference? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 32public override void Write(Utf8JsonWriter writer, IJSObjectReference value, JsonSerializerOptions options)
Microsoft.ML.AutoML (8)
SweepableEstimator\Converter\MultiModelPipelineConverter.cs (2)
15public override MultiModelPipeline Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 24public override void Write(Utf8JsonWriter writer, MultiModelPipeline value, JsonSerializerOptions options)
SweepableEstimator\Converter\SweepableEstimatorConverter.cs (2)
16public override SweepableEstimator Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 27public override void Write(Utf8JsonWriter writer, SweepableEstimator value, JsonSerializerOptions options)
SweepableEstimator\Converter\SweepableEstimatorPipelineConverter.cs (2)
15public override SweepableEstimatorPipeline Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 25public override void Write(Utf8JsonWriter writer, SweepableEstimatorPipeline value, JsonSerializerOptions options)
SweepableEstimator\Converter\SweepablePipelineConverter.cs (2)
15public override SweepablePipeline Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 25public override void Write(Utf8JsonWriter writer, SweepablePipeline value, JsonSerializerOptions options)
Microsoft.ML.AutoML.Tests (8)
AutoFeaturizerTests.cs (1)
21private readonly JsonSerializerOptions _jsonSerializerOptions;
SweepableEstimatorPipelineTest.cs (1)
24private readonly JsonSerializerOptions _jsonSerializerOptions;
SweepableExtensionTest.cs (1)
24private readonly JsonSerializerOptions _jsonSerializerOptions;
SweepablePipelineTests.cs (1)
22private readonly JsonSerializerOptions _jsonSerializerOptions;
Utils\DoubleToDecimalConverter.cs (2)
13public override double Read(ref Utf8JsonReader reader, Type type, JsonSerializerOptions options) 18public override void Write(Utf8JsonWriter writer, double value, JsonSerializerOptions options)
Utils\FloatToDecimalConverter.cs (2)
13public override float Read(ref Utf8JsonReader reader, Type type, JsonSerializerOptions options) 18public override void Write(Utf8JsonWriter writer, float value, JsonSerializerOptions options)
Microsoft.ML.SearchSpace (11)
Converter\ChoiceOptionConverter.cs (2)
28public override ChoiceOption Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 35public override void Write(Utf8JsonWriter writer, ChoiceOption value, JsonSerializerOptions options)
Converter\NumericOptionConverter.cs (2)
37public override UniformNumericOption Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 50public override void Write(Utf8JsonWriter writer, UniformNumericOption value, JsonSerializerOptions options)
Converter\OptionConverter.cs (2)
16public override OptionBase Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 46public override void Write(Utf8JsonWriter writer, OptionBase value, JsonSerializerOptions options)
Converter\ParameterConverter.cs (2)
15public override Parameter Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 54public override void Write(Utf8JsonWriter writer, Parameter value, JsonSerializerOptions options)
Converter\SearchSpaceConverter.cs (2)
16public override SearchSpace Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 23public override void Write(Utf8JsonWriter writer, SearchSpace value, JsonSerializerOptions options)
Parameter.cs (1)
65private readonly JsonSerializerOptions _settings = new JsonSerializerOptions()
Microsoft.ML.SearchSpace.Tests (6)
ParameterTest.cs (1)
21private readonly JsonSerializerOptions _settings = new JsonSerializerOptions()
SearchSpaceTest.cs (5)
24private readonly JsonSerializerOptions _settings = new JsonSerializerOptions() 367public override double Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 370public override void Write(Utf8JsonWriter writer, double value, JsonSerializerOptions options) 378public override float Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 381public override void Write(Utf8JsonWriter writer, float value, JsonSerializerOptions options)
Microsoft.ML.Tokenizers (8)
Utils\StringSpanOrdinalKey.cs (6)
136public override StringSpanOrdinalKey ReadAsPropertyName(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => 139public override void WriteAsPropertyName(Utf8JsonWriter writer, StringSpanOrdinalKey value, JsonSerializerOptions options) => 142public override StringSpanOrdinalKey Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => new StringSpanOrdinalKey(reader.GetString()!); 143public override void Write(Utf8JsonWriter writer, StringSpanOrdinalKey value, JsonSerializerOptions options) => writer.WriteStringValue(value.Data!); 148public override Vocabulary Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 169public override void Write(Utf8JsonWriter writer, Vocabulary value, JsonSerializerOptions options) => throw new NotImplementedException();
Utils\TokenizerExtensions.cs (2)
66public override SortedDictionary<int, string>? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => null; 68public override void Write(Utf8JsonWriter writer, SortedDictionary<int, string> value, JsonSerializerOptions options)
MSBuild (2)
JsonOutputFormatter.cs (1)
20private static readonly JsonSerializerOptions s_options = new() { AllowTrailingCommas = false, WriteIndented = true };
XMake.cs (1)
4645var options = new JsonSerializerOptions() { AllowTrailingCommas = false, WriteIndented = true };
System.Memory.Data (7)
System\BinaryData.cs (5)
90public BinaryData(object? jsonSerializable, JsonSerializerOptions? options = default, Type? type = default) : this( 396public static BinaryData FromObjectAsJson<T>(T jsonSerializable, JsonSerializerOptions? options = default) 433/// <seealso cref="ToObjectFromJson{String}(JsonSerializerOptions)" /> 473/// <param name="options">The <see cref="JsonSerializerOptions"/> to use when serializing to JSON.</param> 477public T? ToObjectFromJson<T>(JsonSerializerOptions? options = default)
System\BinaryDataConverter.cs (2)
18public override BinaryData? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 24public override void Write(Utf8JsonWriter writer, BinaryData value, JsonSerializerOptions options)
System.Net.Http.Json (33)
System\Net\Http\Json\HttpClientJsonExtensions.cs (4)
19private static Task<object?> FromJsonAsyncCore(Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> getMethod, HttpClient client, Uri? requestUri, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken = default) => 20FromJsonAsyncCore(getMethod, client, requestUri, static (stream, options, cancellation) => JsonSerializer.DeserializeAsync(stream, options.type, options.options ?? JsonSerializerOptions.Web, cancellation), (type, options), cancellationToken); 24private static Task<TValue?> FromJsonAsyncCore<TValue>(Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> getMethod, HttpClient client, Uri? requestUri, JsonSerializerOptions? options, CancellationToken cancellationToken = default) => 25FromJsonAsyncCore(getMethod, client, requestUri, static (stream, options, cancellation) => JsonSerializer.DeserializeAsync<TValue>(stream, options ?? JsonSerializerOptions.Web, cancellation), options, cancellationToken);
System\Net\Http\Json\HttpClientJsonExtensions.Delete.cs (4)
33public static Task<object?> DeleteFromJsonAsync(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken = default) => 48public static Task<object?> DeleteFromJsonAsync(this HttpClient client, Uri? requestUri, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken = default) => 63public static Task<TValue?> DeleteFromJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, JsonSerializerOptions? options, CancellationToken cancellationToken = default) => 78public static Task<TValue?> DeleteFromJsonAsync<TValue>(this HttpClient client, Uri? requestUri, JsonSerializerOptions? options, CancellationToken cancellationToken = default) =>
System\Net\Http\Json\HttpClientJsonExtensions.Get.AsyncEnumerable.cs (3)
34JsonSerializerOptions? options, 54JsonSerializerOptions? options, 135JsonSerializerOptions? options,
System\Net\Http\Json\HttpClientJsonExtensions.Get.cs (4)
23public static Task<object?> GetFromJsonAsync(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken = default) => 28public static Task<object?> GetFromJsonAsync(this HttpClient client, Uri? requestUri, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken = default) => 33public static Task<TValue?> GetFromJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, JsonSerializerOptions? options, CancellationToken cancellationToken = default) => 38public static Task<TValue?> GetFromJsonAsync<TValue>(this HttpClient client, Uri? requestUri, JsonSerializerOptions? options, CancellationToken cancellationToken = default) =>
System\Net\Http\Json\HttpClientJsonExtensions.Patch.cs (2)
27public static Task<HttpResponseMessage> PatchAsJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, TValue value, JsonSerializerOptions? options = null, CancellationToken cancellationToken = default) 51public static Task<HttpResponseMessage> PatchAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, JsonSerializerOptions? options = null, CancellationToken cancellationToken = default)
System\Net\Http\Json\HttpClientJsonExtensions.Post.cs (2)
16public static Task<HttpResponseMessage> PostAsJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, TValue value, JsonSerializerOptions? options = null, CancellationToken cancellationToken = default) 29public static Task<HttpResponseMessage> PostAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, JsonSerializerOptions? options = null, CancellationToken cancellationToken = default)
System\Net\Http\Json\HttpClientJsonExtensions.Put.cs (2)
16public static Task<HttpResponseMessage> PutAsJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, TValue value, JsonSerializerOptions? options = null, CancellationToken cancellationToken = default) 29public static Task<HttpResponseMessage> PutAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, JsonSerializerOptions? options = null, CancellationToken cancellationToken = default)
System\Net\Http\Json\HttpContentJsonExtensions.AsyncEnumerable.cs (2)
52JsonSerializerOptions? options, 92JsonSerializerOptions? options,
System\Net\Http\Json\HttpContentJsonExtensions.cs (6)
30public static Task<object?> ReadFromJsonAsync(this HttpContent content, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken = default) 64public static Task<T?> ReadFromJsonAsync<T>(this HttpContent content, JsonSerializerOptions? options, CancellationToken cancellationToken = default) 90private static async Task<object?> ReadFromJsonAsyncCore(HttpContent content, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken) 94return await JsonSerializer.DeserializeAsync(contentStream, type, options ?? JsonSerializerOptions.Web, cancellationToken).ConfigureAwait(false); 100private static async Task<T?> ReadFromJsonAsyncCore<T>(HttpContent content, JsonSerializerOptions? options, CancellationToken cancellationToken) 104return await JsonSerializer.DeserializeAsync<T>(contentStream, options ?? JsonSerializerOptions.Web, cancellationToken).ConfigureAwait(false);
System\Net\Http\Json\JsonContent.cs (2)
53public static JsonContent Create<T>(T inputValue, MediaTypeHeaderValue? mediaType = null, JsonSerializerOptions? options = null) 66public static JsonContent Create(object? inputValue, Type inputType, MediaTypeHeaderValue? mediaType = null, JsonSerializerOptions? options = null)
System\Net\Http\Json\JsonHelpers.cs (2)
17internal static JsonTypeInfo GetJsonTypeInfo(Type type, JsonSerializerOptions? options) 23options ??= JsonSerializerOptions.Web;
System.Text.Json (609)
src\libraries\System.Text.Json\Common\JsonIgnoreCondition.cs (2)
7/// When specified on <see cref="JsonSerializerOptions.DefaultIgnoreCondition"/>, 11/// overrides the setting on <see cref="JsonSerializerOptions.DefaultIgnoreCondition"/>.
src\libraries\System.Text.Json\Common\JsonSerializerDefaults.cs (1)
7/// Signifies what default options are used by <see cref="JsonSerializerOptions"/>.
src\libraries\System.Text.Json\Common\JsonSourceGenerationOptionsAttribute.cs (24)
44/// Specifies the default value of <see cref="JsonSerializerOptions.AllowOutOfOrderMetadataProperties"/> when set. 49/// Specifies the default value of <see cref="JsonSerializerOptions.AllowTrailingCommas"/> when set. 54/// Specifies the default value of <see cref="JsonSerializerOptions.Converters"/> when set. 59/// Specifies the default value of <see cref="JsonSerializerOptions.DefaultBufferSize"/> when set. 64/// Specifies the default value of <see cref="JsonSerializerOptions.DefaultIgnoreCondition"/> when set. 69/// Specifies the default value of <see cref="JsonSerializerOptions.DictionaryKeyPolicy"/> when set. 74/// Specifies the default value of <see cref="JsonSerializerOptions.IgnoreReadOnlyFields"/> when set. 79/// Specifies the default value of <see cref="JsonSerializerOptions.IgnoreReadOnlyProperties"/> when set. 84/// Specifies the default value of <see cref="JsonSerializerOptions.IncludeFields"/> when set. 89/// Specifies the default value of <see cref="JsonSerializerOptions.MaxDepth"/> when set. 94/// Specifies the default value of <see cref="JsonSerializerOptions.NumberHandling"/> when set. 99/// Specifies the default value of <see cref="JsonSerializerOptions.PreferredObjectCreationHandling"/> when set. 104/// Specifies the default value of <see cref="JsonSerializerOptions.PropertyNameCaseInsensitive"/> when set. 109/// Specifies the default value of <see cref="JsonSerializerOptions.PropertyNamingPolicy"/> when set. 114/// Specifies the default value of <see cref="JsonSerializerOptions.ReadCommentHandling"/> when set. 119/// Specifies the default value of <see cref="JsonSerializerOptions.ReferenceHandler"/> when set. 124/// Specifies the default value of <see cref="JsonSerializerOptions.RespectNullableAnnotations"/> when set. 129/// Specifies the default value of <see cref="JsonSerializerOptions.RespectRequiredConstructorParameters"/> when set. 134/// Specifies the default value of <see cref="JsonSerializerOptions.UnknownTypeHandling"/> when set. 139/// Specifies the default value of <see cref="JsonSerializerOptions.UnmappedMemberHandling"/> when set. 144/// Specifies the default value of <see cref="JsonSerializerOptions.WriteIndented"/> when set. 149/// Specifies the default value of <see cref="JsonSerializerOptions.IndentCharacter"/> when set. 154/// Specifies the default value of <see cref="JsonSerializerOptions.IndentCharacter"/> when set. 170/// Specifies the default value of <see cref="JsonSerializerOptions.NewLine"/> when set.
System\Text\Json\Nodes\JsonArray.cs (1)
264public override void WriteTo(Utf8JsonWriter writer, JsonSerializerOptions? options = null)
System\Text\Json\Nodes\JsonNode.cs (3)
13/// <seealso cref="JsonSerializerOptions.UnknownTypeHandling"/> to specify that a type 18private protected static readonly JsonSerializerOptions s_defaultOptions = new(); 389var jsonTypeInfo = (JsonTypeInfo<T>)JsonSerializerOptions.Default.GetTypeInfo(typeof(T));
System\Text\Json\Nodes\JsonNode.To.cs (4)
15public string ToJsonString(JsonSerializerOptions? options = null) 18int defaultBufferSize = JsonSerializerOptions.BufferSizeDefault; 58Utf8JsonWriter writer = Utf8JsonWriterCache.RentWriterAndBuffer(new JsonWriterOptions { Indented = true }, JsonSerializerOptions.BufferSizeDefault, out PooledByteBufferWriter output); 79public abstract void WriteTo(Utf8JsonWriter writer, JsonSerializerOptions? options = null);
System\Text\Json\Nodes\JsonObject.cs (1)
132public override void WriteTo(Utf8JsonWriter writer, JsonSerializerOptions? options = null)
System\Text\Json\Nodes\JsonValue.cs (2)
67var jsonTypeInfo = (JsonTypeInfo<T>)JsonSerializerOptions.Default.GetTypeInfo(typeof(T)); 139JsonSerializerOptions.BufferSizeDefault,
System\Text\Json\Nodes\JsonValueOfElement.cs (1)
197public override void WriteTo(Utf8JsonWriter writer, JsonSerializerOptions? options = null)
System\Text\Json\Nodes\JsonValueOfTCustomized.cs (2)
29public override void WriteTo(Utf8JsonWriter writer, JsonSerializerOptions? options = null) 52Utf8JsonWriter writer = Utf8JsonWriterCache.RentWriterAndBuffer(options: default, JsonSerializerOptions.BufferSizeDefault, out PooledByteBufferWriter output);
System\Text\Json\Nodes\JsonValueOfTPrimitive.cs (1)
42public override void WriteTo(Utf8JsonWriter writer, JsonSerializerOptions? options = null)
System\Text\Json\Schema\JsonSchemaExporter.cs (4)
27public static JsonNode GetJsonSchemaAsNode(this JsonSerializerOptions options, Type type, JsonSchemaExporterOptions? exporterOptions = null) 383private static void ValidateOptions(JsonSerializerOptions options) 408private readonly ref struct GenerationState(JsonSerializerOptions options, JsonSchemaExporterOptions exporterOptions) 414public JsonSerializerOptions Options { get; } = options;
System\Text\Json\Serialization\Attributes\JsonConverterAttribute.cs (1)
15/// <see cref="JsonSerializerOptions.Converters"/> or there is another <see cref="JsonConverterAttribute"/> on a property or field
System\Text\Json\Serialization\Attributes\JsonExtensionDataAttribute.cs (1)
17/// <see cref="JsonElement"/> depending on the value of <see cref="System.Text.Json.JsonSerializerOptions.UnknownTypeHandling"/>.
System\Text\Json\Serialization\Attributes\JsonUnmappedMemberHandlingAttribute.cs (1)
8/// for the specific type, overriding the global <see cref="JsonSerializerOptions.UnmappedMemberHandling"/> setting.
System\Text\Json\Serialization\Converters\CastingConverter.cs (9)
44public override T? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 47public override void Write(Utf8JsonWriter writer, T value, JsonSerializerOptions options) 50internal override bool OnTryRead(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, scoped ref ReadStack state, out T? value) 57internal override bool OnTryWrite(Utf8JsonWriter writer, T value, JsonSerializerOptions options, ref WriteStack state) 60public override T ReadAsPropertyName(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 63internal override T ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 66public override void WriteAsPropertyName(Utf8JsonWriter writer, [DisallowNull] T value, JsonSerializerOptions options) 69internal override void WriteAsPropertyNameCore(Utf8JsonWriter writer, T value, JsonSerializerOptions options, bool isWritingExtensionDataProperty) 72internal override T ReadNumberWithCustomHandling(ref Utf8JsonReader reader, JsonNumberHandling handling, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Collection\ArrayConverter.cs (3)
22protected override void CreateCollection(ref Utf8JsonReader reader, scoped ref ReadStack state, JsonSerializerOptions options) 28protected override void ConvertCollection(ref ReadStack state, JsonSerializerOptions options) 34protected override bool OnWriteResume(Utf8JsonWriter writer, TElement[] array, JsonSerializerOptions options, ref WriteStack state)
System\Text\Json\Serialization\Converters\Collection\DictionaryDefaultConverter.cs (1)
24JsonSerializerOptions options,
System\Text\Json\Serialization\Converters\Collection\DictionaryOfTKeyTValueConverter.cs (2)
20protected override void Add(TKey key, in TValue value, JsonSerializerOptions options, ref ReadStack state) 28JsonSerializerOptions options,
System\Text\Json\Serialization\Converters\Collection\IAsyncEnumerableConverterFactory.cs (1)
22public override JsonConverter CreateConverter(Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Collection\IAsyncEnumerableOfTConverter.cs (4)
15internal override bool OnTryRead(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, scoped ref ReadStack state, out TAsyncEnumerable value) 31protected override void CreateCollection(ref Utf8JsonReader reader, scoped ref ReadStack state, JsonSerializerOptions options) 36internal override bool OnTryWrite(Utf8JsonWriter writer, TAsyncEnumerable value, JsonSerializerOptions options, ref WriteStack state) 47protected override bool OnWriteResume(Utf8JsonWriter writer, TAsyncEnumerable value, JsonSerializerOptions options, ref WriteStack state)
System\Text\Json\Serialization\Converters\Collection\ICollectionOfTConverter.cs (2)
29protected override void CreateCollection(ref Utf8JsonReader reader, scoped ref ReadStack state, JsonSerializerOptions options) 40internal override void ConfigureJsonTypeInfo(JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Collection\IDictionaryConverter.cs (3)
21protected override void Add(string key, in object? value, JsonSerializerOptions options, ref ReadStack state) 42protected internal override bool OnWriteResume(Utf8JsonWriter writer, TDictionary value, JsonSerializerOptions options, ref WriteStack state) 99internal override void ConfigureJsonTypeInfo(JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Collection\IDictionaryOfTKeyTValueConverter.cs (2)
21protected override void Add(TKey key, in TValue value, JsonSerializerOptions options, ref ReadStack state) 42internal override void ConfigureJsonTypeInfo(JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Collection\IEnumerableConverter.cs (2)
26protected override void CreateCollection(ref Utf8JsonReader reader, scoped ref ReadStack state, JsonSerializerOptions options) 42JsonSerializerOptions options,
System\Text\Json\Serialization\Converters\Collection\IEnumerableConverterFactory.cs (1)
35public override JsonConverter CreateConverter(Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Collection\IEnumerableDefaultConverter.cs (1)
17protected override bool OnWriteResume(Utf8JsonWriter writer, TCollection value, JsonSerializerOptions options, ref WriteStack state)
System\Text\Json\Serialization\Converters\Collection\IEnumerableOfTConverter.cs (1)
24protected override void CreateCollection(ref Utf8JsonReader reader, scoped ref ReadStack state, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Collection\IListConverter.cs (3)
28protected override void CreateCollection(ref Utf8JsonReader reader, scoped ref ReadStack state, JsonSerializerOptions options) 39protected override bool OnWriteResume(Utf8JsonWriter writer, TCollection value, JsonSerializerOptions options, ref WriteStack state) 79internal override void ConfigureJsonTypeInfo(JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Collection\IListOfTConverter.cs (2)
29protected override void CreateCollection(ref Utf8JsonReader reader, scoped ref ReadStack state, JsonSerializerOptions options) 40internal override void ConfigureJsonTypeInfo(JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Collection\ImmutableDictionaryOfTKeyTValueConverter.cs (2)
15protected sealed override void Add(TKey key, in TValue value, JsonSerializerOptions options, ref ReadStack state) 29protected sealed override void ConvertCollection(ref ReadStack state, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Collection\ImmutableDictionaryOfTKeyTValueConverterWithReflection.cs (1)
24internal override void ConfigureJsonTypeInfoUsingReflection(JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Collection\ImmutableEnumerableOfTConverter.cs (2)
22protected sealed override void CreateCollection(ref Utf8JsonReader reader, scoped ref ReadStack state, JsonSerializerOptions options) 28protected sealed override void ConvertCollection(ref ReadStack state, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Collection\ImmutableEnumerableOfTConverterWithReflection.cs (1)
23internal override void ConfigureJsonTypeInfoUsingReflection(JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Collection\IReadOnlyDictionaryOfTKeyTValueConverter.cs (1)
16protected override void Add(TKey key, in TValue value, JsonSerializerOptions options, ref ReadStack state)
System\Text\Json\Serialization\Converters\Collection\ISetOfTConverter.cs (2)
26protected override void CreateCollection(ref Utf8JsonReader reader, scoped ref ReadStack state, JsonSerializerOptions options) 37internal override void ConfigureJsonTypeInfo(JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Collection\JsonCollectionConverter.cs (5)
26protected virtual void CreateCollection(ref Utf8JsonReader reader, scoped ref ReadStack state, JsonSerializerOptions options) 48protected virtual void ConvertCollection(ref ReadStack state, JsonSerializerOptions options) { } 64JsonSerializerOptions options, 294JsonSerializerOptions options, 346protected abstract bool OnWriteResume(Utf8JsonWriter writer, TCollection value, JsonSerializerOptions options, ref WriteStack state);
System\Text\Json\Serialization\Converters\Collection\JsonDictionaryConverter.cs (6)
18protected internal abstract bool OnWriteResume(Utf8JsonWriter writer, TDictionary dictionary, JsonSerializerOptions options, ref WriteStack state); 30protected abstract void Add(TKey key, in TValue value, JsonSerializerOptions options, ref ReadStack state); 36protected virtual void ConvertCollection(ref ReadStack state, JsonSerializerOptions options) { } 75JsonSerializerOptions options, 314static TKey ReadDictionaryKey(JsonConverter<TKey> keyConverter, ref Utf8JsonReader reader, scoped ref ReadStack state, JsonSerializerOptions options) 337JsonSerializerOptions options,
System\Text\Json\Serialization\Converters\Collection\ListOfTConverter.cs (2)
21protected override void CreateCollection(ref Utf8JsonReader reader, scoped ref ReadStack state, JsonSerializerOptions options) 36protected override bool OnWriteResume(Utf8JsonWriter writer, TCollection value, JsonSerializerOptions options, ref WriteStack state)
System\Text\Json\Serialization\Converters\Collection\MemoryConverter.cs (4)
17JsonSerializerOptions options, 35protected override void CreateCollection(ref Utf8JsonReader reader, scoped ref ReadStack state, JsonSerializerOptions options) 41protected override void ConvertCollection(ref ReadStack state, JsonSerializerOptions options) 47protected override bool OnWriteResume(Utf8JsonWriter writer, Memory<T> value, JsonSerializerOptions options, ref WriteStack state)
System\Text\Json\Serialization\Converters\Collection\MemoryConverterFactory.cs (1)
24public override JsonConverter? CreateConverter(Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Collection\QueueOfTConverter.cs (1)
19protected override void CreateCollection(ref Utf8JsonReader reader, scoped ref ReadStack state, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Collection\ReadOnlyMemoryConverter.cs (5)
17JsonSerializerOptions options, 35protected override void CreateCollection(ref Utf8JsonReader reader, scoped ref ReadStack state, JsonSerializerOptions options) 41protected override void ConvertCollection(ref ReadStack state, JsonSerializerOptions options) 47protected override bool OnWriteResume(Utf8JsonWriter writer, ReadOnlyMemory<T> value, JsonSerializerOptions options, ref WriteStack state) 52internal static bool OnWriteResume(Utf8JsonWriter writer, ReadOnlySpan<T> value, JsonSerializerOptions options, ref WriteStack state)
System\Text\Json\Serialization\Converters\Collection\RootLevelListConverter.cs (1)
26internal override bool OnTryRead(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, scoped ref ReadStack state, out List<T?>? value)
System\Text\Json\Serialization\Converters\Collection\StackOfTConverter.cs (1)
20protected override void CreateCollection(ref Utf8JsonReader reader, scoped ref ReadStack state, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Collection\StackOrQueueConverter.cs (2)
23protected sealed override void CreateCollection(ref Utf8JsonReader reader, scoped ref ReadStack state, JsonSerializerOptions options) 43protected sealed override bool OnWriteResume(Utf8JsonWriter writer, TCollection value, JsonSerializerOptions options, ref WriteStack state)
System\Text\Json\Serialization\Converters\Collection\StackOrQueueConverterWithReflection.cs (1)
21internal override void ConfigureJsonTypeInfoUsingReflection(JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\FSharp\FSharpListConverter.cs (2)
29protected override void CreateCollection(ref Utf8JsonReader reader, scoped ref ReadStack state, JsonSerializerOptions options) 35protected override void ConvertCollection(ref ReadStack state, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\FSharp\FSharpMapConverter.cs (2)
24protected override void Add(TKey key, in TValue value, JsonSerializerOptions options, ref ReadStack state) 38protected override void ConvertCollection(ref ReadStack state, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\FSharp\FSharpOptionConverter.cs (4)
33internal override bool OnTryRead(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, scoped ref ReadStack state, out TOption? value) 53internal override bool OnTryWrite(Utf8JsonWriter writer, TOption value, JsonSerializerOptions options, ref WriteStack state) 70public override void Write(Utf8JsonWriter writer, TOption value, JsonSerializerOptions options) 83public override TOption? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\FSharp\FSharpSetConverter.cs (2)
29protected override void CreateCollection(ref Utf8JsonReader reader, scoped ref ReadStack state, JsonSerializerOptions options) 35protected override void ConvertCollection(ref ReadStack state, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\FSharp\FSharpTypeConverterFactory.cs (1)
29public override JsonConverter? CreateConverter(Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\FSharp\FSharpValueOptionConverter.cs (4)
33internal override bool OnTryRead(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, scoped ref ReadStack state, out TValueOption value) 53internal override bool OnTryWrite(Utf8JsonWriter writer, TValueOption value, JsonSerializerOptions options, ref WriteStack state) 71public override void Write(Utf8JsonWriter writer, TValueOption value, JsonSerializerOptions options) 85public override TValueOption Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\JsonMetadataServicesConverter.cs (3)
48internal override bool OnTryRead(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, scoped ref ReadStack state, out T? value) 51internal override bool OnTryWrite(Utf8JsonWriter writer, T value, JsonSerializerOptions options, ref WriteStack state) 68internal override void ConfigureJsonTypeInfo(JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Node\JsonArrayConverter.cs (2)
12public override void Write(Utf8JsonWriter writer, JsonArray? value, JsonSerializerOptions options) 23public override JsonArray? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Node\JsonNodeConverter.cs (2)
27public override void Write(Utf8JsonWriter writer, JsonNode? value, JsonSerializerOptions options) 39public override JsonNode? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Node\JsonNodeConverterFactory.cs (1)
12public override JsonConverter? CreateConverter(Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Node\JsonObjectConverter.cs (4)
13internal override void ConfigureJsonTypeInfo(JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options) 22JsonSerializerOptions options, 37public override void Write(Utf8JsonWriter writer, JsonObject? value, JsonSerializerOptions options) 48public override JsonObject? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Node\JsonValueConverter.cs (2)
12public override void Write(Utf8JsonWriter writer, JsonValue? value, JsonSerializerOptions options) 23public override JsonValue? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Object\ObjectConverter.cs (8)
20public sealed override object ReadAsPropertyName(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 26internal sealed override object ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 32public sealed override void Write(Utf8JsonWriter writer, object? value, JsonSerializerOptions options) 44public sealed override void WriteAsPropertyName(Utf8JsonWriter writer, object value, JsonSerializerOptions options) 49internal sealed override void WriteAsPropertyNameCore(Utf8JsonWriter writer, object value, JsonSerializerOptions options, bool isWritingExtensionDataProperty) 81public override object? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 100public override object? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 111internal override bool OnTryRead(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, scoped ref ReadStack state, out object? value)
System\Text\Json\Serialization\Converters\Object\ObjectConverterFactory.cs (1)
41public override JsonConverter CreateConverter(Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Object\ObjectDefaultConverter.cs (3)
20internal override bool OnTryRead(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, scoped ref ReadStack state, [MaybeNullWhen(false)] out T value) 271internal static void PopulatePropertiesFastPath(object obj, JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options, ref Utf8JsonReader reader, scoped ref ReadStack state) 319JsonSerializerOptions options,
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.cs (6)
24internal sealed override bool OnTryRead(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, scoped ref ReadStack state, [MaybeNullWhen(false)] out T value) 273protected abstract void InitializeConstructorArgumentCaches(ref ReadStack state, JsonSerializerOptions options); 283private void ReadConstructorArguments(scoped ref ReadStack state, ref Utf8JsonReader reader, JsonSerializerOptions options) 381private bool ReadConstructorArgumentsWithContinuation(scoped ref ReadStack state, ref Utf8JsonReader reader, JsonSerializerOptions options) 573private void BeginRead(scoped ref ReadStack state, JsonSerializerOptions options) 600JsonSerializerOptions options,
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.Large.cs (1)
52protected sealed override void InitializeConstructorArgumentCaches(ref ReadStack state, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.Large.Reflection.cs (1)
25internal override void ConfigureJsonTypeInfoUsingReflection(JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.Small.cs (2)
89protected override void InitializeConstructorArgumentCaches(ref ReadStack state, JsonSerializerOptions options) 124internal override void ConfigureJsonTypeInfoUsingReflection(JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\BooleanConverter.cs (4)
13public override bool Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 18public override void Write(Utf8JsonWriter writer, bool value, JsonSerializerOptions options) 23internal override bool ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 36internal override void WriteAsPropertyNameCore(Utf8JsonWriter writer, bool value, JsonSerializerOptions options, bool isWritingExtensionDataProperty)
System\Text\Json\Serialization\Converters\Value\ByteArrayConverter.cs (2)
10public override byte[]? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 20public override void Write(Utf8JsonWriter writer, byte[]? value, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\ByteConverter.cs (5)
17public override byte Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 22public override void Write(Utf8JsonWriter writer, byte value, JsonSerializerOptions options) 27internal override byte ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 33internal override void WriteAsPropertyNameCore(Utf8JsonWriter writer, byte value, JsonSerializerOptions options, bool isWritingExtensionDataProperty) 38internal override byte ReadNumberWithCustomHandling(ref Utf8JsonReader reader, JsonNumberHandling handling, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\CharConverter.cs (4)
13public override char Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 36public override void Write(Utf8JsonWriter writer, char value, JsonSerializerOptions options) 47internal override char ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 53internal override void WriteAsPropertyNameCore(Utf8JsonWriter writer, char value, JsonSerializerOptions options, bool isWritingExtensionDataProperty)
System\Text\Json\Serialization\Converters\Value\DateOnlyConverter.cs (4)
15public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 25internal override DateOnly ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 58public override void Write(Utf8JsonWriter writer, DateOnly value, JsonSerializerOptions options) 66internal override void WriteAsPropertyNameCore(Utf8JsonWriter writer, DateOnly value, JsonSerializerOptions options, bool isWritingExtensionDataProperty)
System\Text\Json\Serialization\Converters\Value\DateTimeConverter.cs (4)
11public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 16public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options) 21internal override DateTime ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 27internal override void WriteAsPropertyNameCore(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options, bool isWritingExtensionDataProperty)
System\Text\Json\Serialization\Converters\Value\DateTimeOffsetConverter.cs (4)
11public override DateTimeOffset Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 16public override void Write(Utf8JsonWriter writer, DateTimeOffset value, JsonSerializerOptions options) 21internal override DateTimeOffset ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 27internal override void WriteAsPropertyNameCore(Utf8JsonWriter writer, DateTimeOffset value, JsonSerializerOptions options, bool isWritingExtensionDataProperty)
System\Text\Json\Serialization\Converters\Value\DecimalConverter.cs (5)
16public override decimal Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 21public override void Write(Utf8JsonWriter writer, decimal value, JsonSerializerOptions options) 26internal override decimal ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 32internal override void WriteAsPropertyNameCore(Utf8JsonWriter writer, decimal value, JsonSerializerOptions options, bool isWritingExtensionDataProperty) 37internal override decimal ReadNumberWithCustomHandling(ref Utf8JsonReader reader, JsonNumberHandling handling, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\DoubleConverter.cs (5)
17public override double Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 22public override void Write(Utf8JsonWriter writer, double value, JsonSerializerOptions options) 27internal override double ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 33internal override void WriteAsPropertyNameCore(Utf8JsonWriter writer, double value, JsonSerializerOptions options, bool isWritingExtensionDataProperty) 38internal override double ReadNumberWithCustomHandling(ref Utf8JsonReader reader, JsonNumberHandling handling, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\EnumConverter.cs (5)
56public EnumConverter(EnumConverterOptions converterOptions, JsonNamingPolicy? namingPolicy, JsonSerializerOptions options) 102public override T Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 132public override void Write(Utf8JsonWriter writer, T value, JsonSerializerOptions options) 181internal override T ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 194internal override void WriteAsPropertyNameCore(Utf8JsonWriter writer, T value, JsonSerializerOptions options, bool isWritingExtensionDataProperty)
System\Text\Json\Serialization\Converters\Value\EnumConverterFactory.cs (4)
22public override JsonConverter CreateConverter(Type type, JsonSerializerOptions options) 31public static JsonConverter Create(Type enumType, EnumConverterOptions converterOptions, JsonNamingPolicy? namingPolicy, JsonSerializerOptions options) 41parameterTypes: [typeof(EnumConverterOptions), typeof(JsonNamingPolicy), typeof(JsonSerializerOptions)], 56public static JsonConverter<T> Create<T>(EnumConverterOptions converterOptions, JsonSerializerOptions options, JsonNamingPolicy? namingPolicy = null)
System\Text\Json\Serialization\Converters\Value\GuidConverter.cs (4)
12public override Guid Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 17public override void Write(Utf8JsonWriter writer, Guid value, JsonSerializerOptions options) 22internal override Guid ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 28internal override void WriteAsPropertyNameCore(Utf8JsonWriter writer, Guid value, JsonSerializerOptions options, bool isWritingExtensionDataProperty)
System\Text\Json\Serialization\Converters\Value\HalfConverter.cs (5)
21public override Half Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 31public override void Write(Utf8JsonWriter writer, Half value, JsonSerializerOptions options) 72internal override Half ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 78internal override void WriteAsPropertyNameCore(Utf8JsonWriter writer, Half value, JsonSerializerOptions options, bool isWritingExtensionDataProperty) 85internal override Half ReadNumberWithCustomHandling(ref Utf8JsonReader reader, JsonNumberHandling handling, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\Int128Converter.cs (5)
21public override Int128 Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 31public override void Write(Utf8JsonWriter writer, Int128 value, JsonSerializerOptions options) 66internal override Int128 ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 72internal override void WriteAsPropertyNameCore(Utf8JsonWriter writer, Int128 value, JsonSerializerOptions options, bool isWritingExtensionDataProperty) 79internal override Int128 ReadNumberWithCustomHandling(ref Utf8JsonReader reader, JsonNumberHandling handling, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\Int16Converter.cs (5)
17public override short Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 22public override void Write(Utf8JsonWriter writer, short value, JsonSerializerOptions options) 28internal override short ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 34internal override void WriteAsPropertyNameCore(Utf8JsonWriter writer, short value, JsonSerializerOptions options, bool isWritingExtensionDataProperty) 39internal override short ReadNumberWithCustomHandling(ref Utf8JsonReader reader, JsonNumberHandling handling, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\Int32Converter.cs (5)
17public override int Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 22public override void Write(Utf8JsonWriter writer, int value, JsonSerializerOptions options) 28internal override int ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 34internal override void WriteAsPropertyNameCore(Utf8JsonWriter writer, int value, JsonSerializerOptions options, bool isWritingExtensionDataProperty) 39internal override int ReadNumberWithCustomHandling(ref Utf8JsonReader reader, JsonNumberHandling handling, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\Int64Converter.cs (5)
17public override long Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 22public override void Write(Utf8JsonWriter writer, long value, JsonSerializerOptions options) 27internal override long ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 33internal override void WriteAsPropertyNameCore(Utf8JsonWriter writer, long value, JsonSerializerOptions options, bool isWritingExtensionDataProperty) 38internal override long ReadNumberWithCustomHandling(ref Utf8JsonReader reader, JsonNumberHandling handling, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\JsonDocumentConverter.cs (2)
13public override JsonDocument Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 18public override void Write(Utf8JsonWriter writer, JsonDocument? value, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\JsonElementConverter.cs (2)
11public override JsonElement Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 16public override void Write(Utf8JsonWriter writer, JsonElement value, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\JsonPrimitiveConverter.cs (2)
16public sealed override void WriteAsPropertyName(Utf8JsonWriter writer, [DisallowNull] T value, JsonSerializerOptions options) 26public sealed override T ReadAsPropertyName(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\MemoryByteConverter.cs (2)
13public override Memory<byte> Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 18public override void Write(Utf8JsonWriter writer, Memory<byte> value, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\NullableConverter.cs (5)
28internal override bool OnTryRead(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, scoped ref ReadStack state, out T? value) 50internal override bool OnTryWrite(Utf8JsonWriter writer, T? value, JsonSerializerOptions options, ref WriteStack state) 62public override T? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 73public override void Write(Utf8JsonWriter writer, T? value, JsonSerializerOptions options) 85internal override T? ReadNumberWithCustomHandling(ref Utf8JsonReader reader, JsonNumberHandling numberHandling, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\NullableConverterFactory.cs (1)
19public override JsonConverter CreateConverter(Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\ReadOnlyMemoryByteConverter.cs (2)
13public override ReadOnlyMemory<byte> Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 18public override void Write(Utf8JsonWriter writer, ReadOnlyMemory<byte> value, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\SByteConverter.cs (5)
17public override sbyte Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 22public override void Write(Utf8JsonWriter writer, sbyte value, JsonSerializerOptions options) 27internal override sbyte ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 33internal override void WriteAsPropertyNameCore(Utf8JsonWriter writer, sbyte value, JsonSerializerOptions options, bool isWritingExtensionDataProperty) 38internal override sbyte ReadNumberWithCustomHandling(ref Utf8JsonReader reader, JsonNumberHandling handling, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\SingleConverter.cs (5)
18public override float Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 23public override void Write(Utf8JsonWriter writer, float value, JsonSerializerOptions options) 28internal override float ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 34internal override void WriteAsPropertyNameCore(Utf8JsonWriter writer, float value, JsonSerializerOptions options, bool isWritingExtensionDataProperty) 39internal override float ReadNumberWithCustomHandling(ref Utf8JsonReader reader, JsonNumberHandling handling, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\StringConverter.cs (4)
12public override string? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 17public override void Write(Utf8JsonWriter writer, string? value, JsonSerializerOptions options) 30internal override string ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 36internal override void WriteAsPropertyNameCore(Utf8JsonWriter writer, string value, JsonSerializerOptions options, bool isWritingExtensionDataProperty)
System\Text\Json\Serialization\Converters\Value\TimeOnlyConverter.cs (4)
17public override TimeOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 27internal override TimeOnly ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 79public override void Write(Utf8JsonWriter writer, TimeOnly value, JsonSerializerOptions options) 89internal override void WriteAsPropertyNameCore(Utf8JsonWriter writer, TimeOnly value, JsonSerializerOptions options, bool isWritingExtensionDataProperty)
System\Text\Json\Serialization\Converters\Value\TimeSpanConverter.cs (4)
17public override TimeSpan Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 27internal override TimeSpan ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 77public override void Write(Utf8JsonWriter writer, TimeSpan value, JsonSerializerOptions options) 87internal override void WriteAsPropertyNameCore(Utf8JsonWriter writer, TimeSpan value, JsonSerializerOptions options, bool isWritingExtensionDataProperty)
System\Text\Json\Serialization\Converters\Value\UInt128Converter.cs (5)
21public override UInt128 Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 31public override void Write(Utf8JsonWriter writer, UInt128 value, JsonSerializerOptions options) 66internal override UInt128 ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 72internal override void WriteAsPropertyNameCore(Utf8JsonWriter writer, UInt128 value, JsonSerializerOptions options, bool isWritingExtensionDataProperty) 79internal override UInt128 ReadNumberWithCustomHandling(ref Utf8JsonReader reader, JsonNumberHandling handling, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\UInt16Converter.cs (5)
17public override ushort Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 22public override void Write(Utf8JsonWriter writer, ushort value, JsonSerializerOptions options) 28internal override ushort ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 34internal override void WriteAsPropertyNameCore(Utf8JsonWriter writer, ushort value, JsonSerializerOptions options, bool isWritingExtensionDataProperty) 39internal override ushort ReadNumberWithCustomHandling(ref Utf8JsonReader reader, JsonNumberHandling handling, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\UInt32Converter.cs (5)
17public override uint Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 22public override void Write(Utf8JsonWriter writer, uint value, JsonSerializerOptions options) 28internal override uint ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 34internal override void WriteAsPropertyNameCore(Utf8JsonWriter writer, uint value, JsonSerializerOptions options, bool isWritingExtensionDataProperty) 39internal override uint ReadNumberWithCustomHandling(ref Utf8JsonReader reader, JsonNumberHandling handling, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\UInt64Converter.cs (5)
17public override ulong Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 22public override void Write(Utf8JsonWriter writer, ulong value, JsonSerializerOptions options) 27internal override ulong ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 33internal override void WriteAsPropertyNameCore(Utf8JsonWriter writer, ulong value, JsonSerializerOptions options, bool isWritingExtensionDataProperty) 38internal override ulong ReadNumberWithCustomHandling(ref Utf8JsonReader reader, JsonNumberHandling handling, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\UnsupportedTypeConverter.cs (2)
17public override T Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => 20public override void Write(Utf8JsonWriter writer, T value, JsonSerializerOptions options) =>
System\Text\Json\Serialization\Converters\Value\UnsupportedTypeConverterFactory.cs (1)
33public override JsonConverter CreateConverter(Type type, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\UriConverter.cs (4)
12public override Uri? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 17public override void Write(Utf8JsonWriter writer, Uri? value, JsonSerializerOptions options) 28internal override Uri ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 46internal override void WriteAsPropertyNameCore(Utf8JsonWriter writer, Uri value, JsonSerializerOptions options, bool isWritingExtensionDataProperty)
System\Text\Json\Serialization\Converters\Value\VersionConverter.cs (4)
20public override Version? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 81public override void Write(Utf8JsonWriter writer, Version? value, JsonSerializerOptions options) 103internal override Version ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 108internal override void WriteAsPropertyNameCore(Utf8JsonWriter writer, Version value, JsonSerializerOptions options, bool isWritingExtensionDataProperty)
System\Text\Json\Serialization\JsonConverter.cs (17)
105JsonSerializerOptions options, 113internal virtual JsonTypeInfo CreateJsonTypeInfo(JsonSerializerOptions options) 130JsonSerializerOptions.CheckConverterNullabilityIsSameAsPropertyType(this, typeof(TTarget)); 185/// Used in conjunction with <see cref="JsonCollectionConverter{TCollection, TElement}.ConvertCollection(ref ReadStack, JsonSerializerOptions)"/>. 202internal abstract object? ReadAsObject(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options); 203internal abstract bool OnTryReadAsObject(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, scoped ref ReadStack state, out object? value); 204internal abstract bool TryReadAsObject(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, scoped ref ReadStack state, out object? value); 205internal abstract object? ReadAsPropertyNameAsObject(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options); 206internal abstract object? ReadAsPropertyNameCoreAsObject(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options); 207internal abstract object? ReadNumberWithCustomHandlingAsObject(ref Utf8JsonReader reader, JsonNumberHandling handling, JsonSerializerOptions options); 209internal abstract void WriteAsObject(Utf8JsonWriter writer, object? value, JsonSerializerOptions options); 210internal abstract bool OnTryWriteAsObject(Utf8JsonWriter writer, object? value, JsonSerializerOptions options, ref WriteStack state); 211internal abstract bool TryWriteAsObject(Utf8JsonWriter writer, object? value, JsonSerializerOptions options, ref WriteStack state); 212internal abstract void WriteAsPropertyNameAsObject(Utf8JsonWriter writer, object? value, JsonSerializerOptions options); 213internal abstract void WriteAsPropertyNameCoreAsObject(Utf8JsonWriter writer, object? value, JsonSerializerOptions options, bool isWritingExtensionDataProperty); 229internal virtual void ConfigureJsonTypeInfo(JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options) { } 236internal virtual void ConfigureJsonTypeInfoUsingReflection(JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options) { }
System\Text\Json\Serialization\JsonConverter.MetadataHandling.cs (2)
69internal JsonConverter? ResolvePolymorphicConverter(object value, JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options, ref WriteStack state) 138internal bool TryHandleSerializedObjectReference(Utf8JsonWriter writer, object value, JsonSerializerOptions options, JsonConverter? polymorphicConverter, ref WriteStack state)
System\Text\Json\Serialization\JsonConverterFactory.cs (14)
28/// <param name="options">The <see cref="JsonSerializerOptions"/> being used.</param> 33public abstract JsonConverter? CreateConverter(Type typeToConvert, JsonSerializerOptions options); 35internal JsonConverter GetConverterInternal(Type typeToConvert, JsonSerializerOptions options) 53internal sealed override object? ReadAsObject(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 63JsonSerializerOptions options, 75JsonSerializerOptions options, 84internal sealed override object? ReadAsPropertyNameAsObject(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 91internal sealed override object? ReadAsPropertyNameCoreAsObject(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 98internal sealed override object? ReadNumberWithCustomHandlingAsObject(ref Utf8JsonReader reader, JsonNumberHandling handling, JsonSerializerOptions options) 105internal sealed override void WriteAsObject(Utf8JsonWriter writer, object? value, JsonSerializerOptions options) 115JsonSerializerOptions options, 126JsonSerializerOptions options, 134internal sealed override void WriteAsPropertyNameAsObject(Utf8JsonWriter writer, object? value, JsonSerializerOptions options) 147JsonSerializerOptions options,
System\Text\Json\Serialization\JsonConverterOfT.cs (29)
55internal sealed override JsonTypeInfo CreateJsonTypeInfo(JsonSerializerOptions options) 77internal sealed override void WriteAsObject(Utf8JsonWriter writer, object? value, JsonSerializerOptions options) 84internal sealed override bool OnTryWriteAsObject(Utf8JsonWriter writer, object? value, JsonSerializerOptions options, ref WriteStack state) 91internal sealed override void WriteAsPropertyNameAsObject(Utf8JsonWriter writer, object? value, JsonSerializerOptions options) 97internal sealed override void WriteAsPropertyNameCoreAsObject(Utf8JsonWriter writer, object? value, JsonSerializerOptions options, bool isWritingExtensionDataProperty) 110internal sealed override bool TryWriteAsObject(Utf8JsonWriter writer, object? value, JsonSerializerOptions options, ref WriteStack state) 121JsonSerializerOptions options, 129internal virtual bool OnTryRead(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, scoped ref ReadStack state, out T? value) 143/// <param name="options">The <see cref="JsonSerializerOptions"/> being used.</param> 146public abstract T? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options); 148internal bool TryRead(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, scoped ref ReadStack state, out T? value, out bool isPopulatedValue) 282internal sealed override bool OnTryReadAsObject(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, scoped ref ReadStack state, out object? value) 289internal sealed override bool TryReadAsObject(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, scoped ref ReadStack state, out object? value) 296internal sealed override object? ReadAsObject(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 302internal sealed override object? ReadAsPropertyNameAsObject(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 308internal sealed override object? ReadAsPropertyNameCoreAsObject(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 314internal sealed override object? ReadNumberWithCustomHandlingAsObject(ref Utf8JsonReader reader, JsonNumberHandling handling, JsonSerializerOptions options) 327internal bool TryWrite(Utf8JsonWriter writer, in T? value, JsonSerializerOptions options, ref WriteStack state) 445internal bool TryWriteDataExtensionProperty(Utf8JsonWriter writer, T value, JsonSerializerOptions options, ref WriteStack state) 575/// <param name="options">The <see cref="JsonSerializerOptions"/> being used.</param> 581JsonSerializerOptions options); 588/// <param name="options">The <see cref="JsonSerializerOptions"/> being used.</param> 591public virtual T ReadAsPropertyName(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 603internal virtual T ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 622/// <param name="options">The <see cref="JsonSerializerOptions"/> being used.</param> 624public virtual void WriteAsPropertyName(Utf8JsonWriter writer, [DisallowNull] T value, JsonSerializerOptions options) 636internal virtual void WriteAsPropertyNameCore(Utf8JsonWriter writer, [DisallowNull] T value, JsonSerializerOptions options, bool isWritingExtensionDataProperty) 661private JsonConverter<T>? GetFallbackConverterForPropertyNameSerialization(JsonSerializerOptions options) 683internal virtual T ReadNumberWithCustomHandling(ref Utf8JsonReader reader, JsonNumberHandling handling, JsonSerializerOptions options)
System\Text\Json\Serialization\JsonConverterOfT.ReadCore.cs (1)
13JsonSerializerOptions options,
System\Text\Json\Serialization\JsonConverterOfT.WriteCore.cs (1)
11JsonSerializerOptions options,
System\Text\Json\Serialization\JsonNumberEnumConverter.cs (1)
29public override JsonConverter? CreateConverter(Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\JsonResumableConverterOfT.cs (2)
17public sealed override T? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 34public sealed override void Write(Utf8JsonWriter writer, T value, JsonSerializerOptions options)
System\Text\Json\Serialization\JsonSerializer.Helpers.cs (4)
17/// Indicates whether unconfigured <see cref="JsonSerializerOptions"/> instances 33private static JsonTypeInfo GetTypeInfo(JsonSerializerOptions? options, Type inputType) 37options ??= JsonSerializerOptions.Default; 50private static JsonTypeInfo<T> GetTypeInfo<T>(JsonSerializerOptions? options)
System\Text\Json\Serialization\JsonSerializer.Read.Document.cs (2)
31public static TValue? Deserialize<TValue>(this JsonDocument document, JsonSerializerOptions? options = null) 62public static object? Deserialize(this JsonDocument document, Type returnType, JsonSerializerOptions? options = null)
System\Text\Json\Serialization\JsonSerializer.Read.Element.cs (2)
28public static TValue? Deserialize<TValue>(this JsonElement element, JsonSerializerOptions? options = null) 54public static object? Deserialize(this JsonElement element, Type returnType, JsonSerializerOptions? options = null)
System\Text\Json\Serialization\JsonSerializer.Read.HandlePropertyName.cs (3)
23JsonSerializerOptions options, 81JsonSerializerOptions options, 108JsonSerializerOptions options)
System\Text\Json\Serialization\JsonSerializer.Read.Node.cs (4)
30public static TValue? Deserialize<TValue>(this JsonNode? node, JsonSerializerOptions? options = null) 52public static object? Deserialize(this JsonNode? node, Type returnType, JsonSerializerOptions? options = null) 156JsonSerializerOptions options = jsonTypeInfo.Options; 177JsonSerializerOptions options = jsonTypeInfo.Options;
System\Text\Json\Serialization\JsonSerializer.Read.Span.cs (2)
31public static TValue? Deserialize<TValue>(ReadOnlySpan<byte> utf8Json, JsonSerializerOptions? options = null) 58public static object? Deserialize(ReadOnlySpan<byte> utf8Json, Type returnType, JsonSerializerOptions? options = null)
System\Text\Json\Serialization\JsonSerializer.Read.Stream.cs (6)
46JsonSerializerOptions? options = null, 82JsonSerializerOptions? options = null) 121JsonSerializerOptions? options = null, 162JsonSerializerOptions? options = null) 425JsonSerializerOptions? options = null, 455JsonSerializerOptions? options = null,
System\Text\Json\Serialization\JsonSerializer.Read.String.cs (4)
47public static TValue? Deserialize<TValue>([StringSyntax(StringSyntaxAttribute.Json)] string json, JsonSerializerOptions? options = null) 84public static TValue? Deserialize<TValue>([StringSyntax(StringSyntaxAttribute.Json)] ReadOnlySpan<char> json, JsonSerializerOptions? options = null) 119public static object? Deserialize([StringSyntax(StringSyntaxAttribute.Json)] string json, Type returnType, JsonSerializerOptions? options = null) 163public static object? Deserialize([StringSyntax(StringSyntaxAttribute.Json)] ReadOnlySpan<char> json, Type returnType, JsonSerializerOptions? options = null)
System\Text\Json\Serialization\JsonSerializer.Read.Utf8JsonReader.cs (7)
53/// The <see cref="JsonReaderOptions"/> used to create the instance of the <see cref="Utf8JsonReader"/> take precedence over the <see cref="JsonSerializerOptions"/> when they conflict. 59public static TValue? Deserialize<TValue>(ref Utf8JsonReader reader, JsonSerializerOptions? options = null) 106/// The <see cref="JsonReaderOptions"/> used to create the instance of the <see cref="Utf8JsonReader"/> take precedence over the <see cref="JsonSerializerOptions"/> when they conflict. 112public static object? Deserialize(ref Utf8JsonReader reader, Type returnType, JsonSerializerOptions? options = null) 158/// The <see cref="JsonReaderOptions"/> used to create the instance of the <see cref="Utf8JsonReader"/> take precedence over the <see cref="JsonSerializerOptions"/> when they conflict. 207/// The <see cref="JsonReaderOptions"/> used to create the instance of the <see cref="Utf8JsonReader"/> take precedence over the <see cref="JsonSerializerOptions"/> when they conflict. 267/// The <see cref="JsonReaderOptions"/> used to create the instance of the <see cref="Utf8JsonReader"/> take precedence over the <see cref="JsonSerializerOptions"/> when they conflict.
System\Text\Json\Serialization\JsonSerializer.Write.ByteArray.cs (2)
27JsonSerializerOptions? options = null) 55JsonSerializerOptions? options = null)
System\Text\Json\Serialization\JsonSerializer.Write.Document.cs (4)
26public static JsonDocument SerializeToDocument<TValue>(TValue value, JsonSerializerOptions? options = null) 51public static JsonDocument SerializeToDocument(object? value, Type inputType, JsonSerializerOptions? options = null) 134JsonSerializerOptions options = jsonTypeInfo.Options; 155JsonSerializerOptions options = jsonTypeInfo.Options;
System\Text\Json\Serialization\JsonSerializer.Write.Element.cs (4)
26public static JsonElement SerializeToElement<TValue>(TValue value, JsonSerializerOptions? options = null) 51public static JsonElement SerializeToElement(object? value, Type inputType, JsonSerializerOptions? options = null) 135JsonSerializerOptions options = jsonTypeInfo.Options; 152JsonSerializerOptions options = jsonTypeInfo.Options;
System\Text\Json\Serialization\JsonSerializer.Write.Node.cs (4)
27public static JsonNode? SerializeToNode<TValue>(TValue value, JsonSerializerOptions? options = null) 52public static JsonNode? SerializeToNode(object? value, Type inputType, JsonSerializerOptions? options = null) 136JsonSerializerOptions options = jsonTypeInfo.Options; 154JsonSerializerOptions options = jsonTypeInfo.Options;
System\Text\Json\Serialization\JsonSerializer.Write.Pipe.cs (2)
67JsonSerializerOptions? options = null, 180JsonSerializerOptions? options = null,
System\Text\Json\Serialization\JsonSerializer.Write.Stream.cs (4)
44JsonSerializerOptions? options = null, 75JsonSerializerOptions? options = null) 111JsonSerializerOptions? options = null, 147JsonSerializerOptions? options = null)
System\Text\Json\Serialization\JsonSerializer.Write.String.cs (6)
25/// encoding since the implementation internally uses UTF-8. See also <see cref="SerializeToUtf8Bytes{TValue}(TValue, JsonSerializerOptions?)"/> 26/// and <see cref="SerializeAsync{TValue}(IO.Stream, TValue, JsonSerializerOptions?, Threading.CancellationToken)"/>. 30public static string Serialize<TValue>(TValue value, JsonSerializerOptions? options = null) 54/// encoding since the implementation internally uses UTF-8. See also <see cref="SerializeToUtf8Bytes(object?, Type, JsonSerializerOptions?)"/> 55/// and <see cref="SerializeAsync(IO.Stream, object?, Type, JsonSerializerOptions?, Threading.CancellationToken)"/>. 62JsonSerializerOptions? options = null)
System\Text\Json\Serialization\JsonSerializer.Write.Utf8JsonWriter.cs (2)
31JsonSerializerOptions? options = null) 65JsonSerializerOptions? options = null)
System\Text\Json\Serialization\JsonSerializerContext.cs (12)
14private JsonSerializerOptions? _options; 23public JsonSerializerOptions Options 27JsonSerializerOptions? options = _options; 40internal void AssociateWithOptions(JsonSerializerOptions options) 50/// is compatible with the run time specified <see cref="JsonSerializerOptions"/>. 52bool IBuiltInJsonTypeInfoResolver.IsCompatibleWithOptions(JsonSerializerOptions options) 56JsonSerializerOptions? generatedSerializerOptions = GeneratedSerializerOptions; 84protected abstract JsonSerializerOptions? GeneratedSerializerOptions { get; } 87/// Creates an instance of <see cref="JsonSerializerContext"/> and binds it with the indicated <see cref="JsonSerializerOptions"/>. 91/// If no instance options are passed, then no options are set until the context is bound using <see cref="JsonSerializerOptions.AddContext{TContext}"/>, 94protected JsonSerializerContext(JsonSerializerOptions? options) 110JsonTypeInfo? IJsonTypeInfoResolver.GetTypeInfo(Type type, JsonSerializerOptions options)
System\Text\Json\Serialization\JsonSerializerOptions.Caching.cs (14)
19/// Encapsulates all cached metadata referenced by the current <see cref="JsonSerializerOptions" /> instance. 44/// Gets the <see cref="JsonTypeInfo"/> contract metadata resolved by the current <see cref="JsonSerializerOptions"/> instance. 53/// If the <see cref="JsonSerializerOptions"/> instance is locked for modification, the method will return a cached instance for the metadata. 71/// Tries to get the <see cref="JsonTypeInfo"/> contract metadata resolved by the current <see cref="JsonSerializerOptions"/> instance. 81/// If the <see cref="JsonSerializerOptions"/> instance is locked for modification, the method will return a cached instance for the metadata. 208/// Stores and manages all reflection caches for one or more <see cref="JsonSerializerOptions"/> instances. 220public CachingContext(JsonSerializerOptions options, int hashCode) 229public JsonSerializerOptions Options { get; } 405public static CachingContext GetOrCreate(JsonSerializerOptions options) 452JsonSerializerOptions options, 488private sealed class EqualityComparer : IEqualityComparer<JsonSerializerOptions> 490public bool Equals(JsonSerializerOptions? left, JsonSerializerOptions? right) 551public int GetHashCode(JsonSerializerOptions options)
System\Text\Json\Serialization\JsonSerializerOptions.cs (29)
31/// Gets a read-only, singleton instance of <see cref="JsonSerializerOptions" /> that uses the default configuration. 34/// Each <see cref="JsonSerializerOptions" /> instance encapsulates its own serialization metadata caches, 38public static JsonSerializerOptions Default 48private static JsonSerializerOptions? s_defaultOptions; 51/// Gets a read-only, singleton instance of <see cref="JsonSerializerOptions" /> that uses the web configuration. 54/// Each <see cref="JsonSerializerOptions" /> instance encapsulates its own serialization metadata caches, 58public static JsonSerializerOptions Web 68private static JsonSerializerOptions? s_webOptions; 102/// Constructs a new <see cref="JsonSerializerOptions"/> instance. 110/// Copies the options from a <see cref="JsonSerializerOptions"/> instance to a new instance. 112/// <param name="options">The <see cref="JsonSerializerOptions"/> instance to copy options from.</param> 116public JsonSerializerOptions(JsonSerializerOptions options) 163/// Constructs a new <see cref="JsonSerializerOptions"/> instance with a predefined set of options determined by the specified <see cref="JsonSerializerDefaults"/>. 183private static void TrackOptionsInstance(JsonSerializerOptions options) => TrackedOptionsInstances.All.Add(options, null); 189public static ConditionalWeakTable<JsonSerializerOptions, object?> All { get; } = 192new ConditionalWeakTable<JsonSerializerOptions, object?>(); 196/// Binds current <see cref="JsonSerializerOptions"/> instance with a new instance of the specified <see cref="Serialization.JsonSerializerContext"/> type. 250/// The ordering of the chain is significant: <see cref="JsonSerializerOptions "/> will query each 252/// If all resolvers in the chain return null, then <see cref="JsonSerializerOptions"/> will also return null. 824/// This flag allows users to toggle that behavior as necessary for each <see cref="JsonSerializerOptions"/> instance. 862/// A <see cref="JsonSerializerOptions"/> instance can be locked either if 898/// the semantics of the <see cref="JsonSerializer"/> methods accepting <see cref="JsonSerializerOptions"/> parameters. 1076private readonly JsonSerializerOptions _options; 1078public ConverterList(JsonSerializerOptions options, IList<JsonConverter>? source = null) 1090private readonly JsonSerializerOptions _options; 1092public OptionsBoundJsonTypeInfoResolverChain(JsonSerializerOptions options) 1124private static JsonSerializerOptions GetOrCreateSingleton( 1125ref JsonSerializerOptions? location, 1128var options = new JsonSerializerOptions(defaults)
System\Text\Json\Serialization\JsonSerializerOptionsUpdateHandler.cs (2)
21foreach (KeyValuePair<JsonSerializerOptions, object?> options in JsonSerializerOptions.TrackedOptionsInstances.All)
System\Text\Json\Serialization\JsonStringEnumConverter.cs (2)
53public sealed override JsonConverter? CreateConverter(Type typeToConvert, JsonSerializerOptions options) 112public sealed override JsonConverter CreateConverter(Type typeToConvert, JsonSerializerOptions options)
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Converters.cs (4)
133private static JsonConverter? GetCustomConverterForMember(Type typeToConvert, MemberInfo memberInfo, JsonSerializerOptions options) 144internal static JsonConverter GetConverterForType(Type typeToConvert, JsonSerializerOptions options, bool resolveJsonConverterAttribute = true) 169JsonSerializerOptions.CheckConverterNullabilityIsSameAsPropertyType(converter, typeToConvert); 175private static JsonConverter GetConverterFromAttribute(JsonConverterAttribute converterAttribute, Type typeToConvert, MemberInfo? memberInfo, JsonSerializerOptions options)
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.cs (6)
14/// The contract resolver used by <see cref="JsonSerializerOptions.Default"/>. 40/// <param name="options">A <see cref="JsonSerializerOptions"/> instance used to determine contract configuration.</param> 51public virtual JsonTypeInfo GetTypeInfo(Type type, JsonSerializerOptions options) 86private static JsonTypeInfo CreateJsonTypeInfo(Type type, JsonSerializerOptions options) 96/// The modifier list will be rendered immutable after the first <see cref="GetTypeInfo(Type, JsonSerializerOptions)"/> invocation. 122bool IBuiltInJsonTypeInfoResolver.IsCompatibleWithOptions(JsonSerializerOptions _)
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (2)
46private static JsonTypeInfo CreateTypeInfoCore(Type type, JsonConverter converter, JsonSerializerOptions options) 227JsonSerializerOptions options,
System\Text\Json\Serialization\Metadata\IJsonTypeInfoResolver.cs (1)
20JsonTypeInfo? GetTypeInfo(Type type, JsonSerializerOptions options);
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Collections.cs (28)
17/// <param name="options">The <see cref="JsonSerializerOptions"/> to use.</param> 21public static JsonTypeInfo<TElement[]> CreateArrayInfo<TElement>(JsonSerializerOptions options, JsonCollectionInfoValues<TElement[]> collectionInfo) 32/// <param name="options">The <see cref="JsonSerializerOptions"/> to use.</param> 37JsonSerializerOptions options, 56JsonSerializerOptions options, 81JsonSerializerOptions options, 110JsonSerializerOptions options, 130JsonSerializerOptions options, 150JsonSerializerOptions options, 176JsonSerializerOptions options, 194JsonSerializerOptions options, 212JsonSerializerOptions options, 230JsonSerializerOptions options, 248JsonSerializerOptions options, 266JsonSerializerOptions options, 284JsonSerializerOptions options, 302JsonSerializerOptions options, 320JsonSerializerOptions options, 338JsonSerializerOptions options, 355JsonSerializerOptions options, 375JsonSerializerOptions options, 393JsonSerializerOptions options, 400JsonSerializerOptions options, 427JsonSerializerOptions options, 439/// <param name="options">The <see cref="JsonSerializerOptions"/> to use.</param> 443public static JsonTypeInfo<Memory<TElement>> CreateMemoryInfo<TElement>(JsonSerializerOptions options, JsonCollectionInfoValues<Memory<TElement>> collectionInfo) 453/// <param name="options">The <see cref="JsonSerializerOptions"/> to use.</param> 457public static JsonTypeInfo<ReadOnlyMemory<TElement>> CreateReadOnlyMemoryInfo<TElement>(JsonSerializerOptions options, JsonCollectionInfoValues<ReadOnlyMemory<TElement>> collectionInfo)
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Converters.cs (4)
280/// <param name="options">The <see cref="JsonSerializerOptions"/> to use for serialization and deserialization.</param> 283public static JsonConverter<T> GetEnumConverter<T>(JsonSerializerOptions options) where T : struct, Enum 316/// <param name="options">The <see cref="JsonSerializerOptions"/> to use for serialization and deserialization.</param> 319public static JsonConverter<T?> GetNullableConverter<T>(JsonSerializerOptions options) where T : struct
System\Text\Json\Serialization\Metadata\JsonMetadataServices.cs (5)
19/// <param name="options">The <see cref="JsonSerializerOptions"/> to initialize the metadata with.</param> 23public static JsonPropertyInfo CreatePropertyInfo<T>(JsonSerializerOptions options, JsonPropertyInfoValues<T> propertyInfo) 57/// <param name="options">The <see cref="JsonSerializerOptions"/> to initialize the metadata with.</param> 63public static JsonTypeInfo<T> CreateObjectInfo<T>(JsonSerializerOptions options, JsonObjectInfoValues<T> objectInfo) where T : notnull 83public static JsonTypeInfo<T> CreateValueInfo<T>(JsonSerializerOptions options, JsonConverter converter)
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Helpers.cs (4)
15private static JsonTypeInfo<T> CreateCore<T>(JsonConverter converter, JsonSerializerOptions options) 30private static JsonTypeInfo<T> CreateCore<T>(JsonSerializerOptions options, JsonObjectInfoValues<T> objectInfo) 72JsonSerializerOptions options, 175private static JsonPropertyInfo<T> CreatePropertyInfoCore<T>(JsonPropertyInfoValues<T> propertyInfoValues, JsonSerializerOptions options)
System\Text\Json\Serialization\Metadata\JsonParameterInfo.cs (2)
70/// This property has no effect on deserialization unless the <see cref="JsonSerializerOptions.RespectNullableAnnotations"/> 119internal JsonSerializerOptions Options => MatchingProperty.Options;
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (7)
200/// and <see cref="JsonSerializerOptions.PreferredObjectCreationHandling"/> value. 243/// This property has no effect on serialization unless the <see cref="JsonSerializerOptions.RespectNullableAnnotations"/> 279/// This property has no effect on deserialization unless the <see cref="JsonSerializerOptions.RespectNullableAnnotations"/> 374internal JsonPropertyInfo(Type declaringType, Type propertyType, JsonTypeInfo? declaringTypeInfo, JsonSerializerOptions options) 786/// the value typically reflects the underlying .NET member name, the name derived from <see cref="JsonSerializerOptions.PropertyNamingPolicy" />, 822/// Gets the <see cref="JsonSerializerOptions"/> value associated with the current contract instance. 824public JsonSerializerOptions Options { get; }
System\Text\Json\Serialization\Metadata\JsonPropertyInfoOfT.cs (1)
19internal JsonPropertyInfo(Type declaringType, JsonTypeInfo? declaringTypeInfo, JsonSerializerOptions options)
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (16)
42internal JsonTypeInfo(Type type, JsonConverter converter, JsonSerializerOptions options) 436/// Gets the <see cref="JsonSerializerOptions"/> value associated with the current <see cref="JsonTypeInfo" /> instance. 438public JsonSerializerOptions Options { get; } 465/// User-defined custom converters (specified either via <see cref="JsonConverterAttribute"/> or <see cref="JsonSerializerOptions.Converters"/>) 486/// Gets or sets the type-level <see cref="JsonSerializerOptions.NumberHandling"/> override. 892/// <param name="options">The <see cref="JsonSerializerOptions"/> instance the metadata is associated with.</param> 898/// <see cref="JsonSerializerOptions.Converters"/> or the built-in converters for the type. 907public static JsonTypeInfo<T> CreateJsonTypeInfo<T>(JsonSerializerOptions options) 922/// <param name="options">The <see cref="JsonSerializerOptions"/> instance the metadata is associated with.</param> 929/// <see cref="JsonSerializerOptions.Converters"/> or the built-in converters for the type. 938public static JsonTypeInfo CreateJsonTypeInfo(Type type, JsonSerializerOptions options) 961internal static JsonTypeInfo CreateJsonTypeInfo(Type type, JsonConverter converter, JsonSerializerOptions options) 975parameterTypes: [typeof(JsonConverter), typeof(JsonSerializerOptions)], 1037parameterTypes: [typeof(Type), typeof(JsonTypeInfo), typeof(JsonSerializerOptions)], 1048private protected abstract JsonPropertyInfo CreateJsonPropertyInfo(JsonTypeInfo declaringTypeInfo, Type? declaringType, JsonSerializerOptions options); 1064internal ref struct PropertyHierarchyResolutionState(JsonSerializerOptions options)
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.cs (2)
19internal JsonTypeInfo(JsonConverter converter, JsonSerializerOptions options) 150private protected override JsonPropertyInfo CreateJsonPropertyInfo(JsonTypeInfo declaringTypeInfo, Type? declaringType, JsonSerializerOptions options)
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.ReadHelper.cs (2)
28JsonSerializerOptions options = Options; 60JsonSerializerOptions options = Options;
System\Text\Json\Serialization\Metadata\JsonTypeInfoResolver.cs (6)
94/// are compatible with the run time specified <see cref="JsonSerializerOptions"/>. 96internal static bool IsCompatibleWithOptions(this IJsonTypeInfoResolver? resolver, JsonSerializerOptions options) 105public JsonTypeInfo? GetTypeInfo(Type type, JsonSerializerOptions options) => null; 106public bool IsCompatibleWithOptions(JsonSerializerOptions _) => true; 117/// are compatible with the run time specified <see cref="JsonSerializerOptions"/>. 119bool IsCompatibleWithOptions(JsonSerializerOptions options);
System\Text\Json\Serialization\Metadata\JsonTypeInfoResolverChain.cs (2)
13public JsonTypeInfo? GetTypeInfo(Type type, JsonSerializerOptions options) 44bool IBuiltInJsonTypeInfoResolver.IsCompatibleWithOptions(JsonSerializerOptions options)
System\Text\Json\Serialization\Metadata\JsonTypeInfoResolverWithAddedModifiers.cs (1)
29public JsonTypeInfo? GetTypeInfo(Type type, JsonSerializerOptions options)
System\Text\Json\Serialization\Metadata\PolymorphicTypeResolver.cs (3)
20private readonly JsonSerializerOptions _options; 22public PolymorphicTypeResolver(JsonSerializerOptions options, JsonPolymorphismOptions polymorphismOptions, Type baseType, bool converterCanHaveMetadata) 312static JsonTypeInfo? ResolveAncestorTypeInfo(Type type, JsonSerializerOptions options)
System\Text\Json\Serialization\ReadStack.cs (1)
98JsonSerializerOptions options = jsonTypeInfo.Options;
System\Text\Json\Serialization\ReferenceHandler.cs (1)
60/// Optimization for the resolver used when <see cref="Preserve"/> is set in <see cref="JsonSerializerOptions.ReferenceHandler"/>;
System\Text\Json\Serialization\WriteStack.cs (1)
160JsonSerializerOptions options = jsonTypeInfo.Options;
System\Text\Json\Serialization\WriteStackFrame.cs (1)
118public JsonTypeInfo InitializePolymorphicReEntry(Type runtimeType, JsonSerializerOptions options)
System\Text\Json\Writer\Utf8JsonWriterCache.cs (2)
17public static Utf8JsonWriter RentWriterAndBuffer(JsonSerializerOptions options, out PooledByteBufferWriter bufferWriter) => 44public static Utf8JsonWriter RentWriter(JsonSerializerOptions options, IBufferWriter<byte> bufferWriter)
TestProject.AppHost (1)
TestProgram.cs (1)
173await Console.Out.WriteLineAsync("$ENDPOINTS: " + JsonSerializer.Serialize(root, JsonSerializerOptions.Default));