54 references to JsonSerializerDefaults
Aspire.Hosting.DevTunnels (1)
DevTunnelCliClient.cs (1)
15private readonly JsonSerializerOptions _jsonOptions = new(JsonSerializerDefaults.Web) { Converters = { new JsonStringEnumConverter() } };
dotnet-watch (2)
AbstractBrowserRefreshServer.cs (1)
35private static readonly JsonSerializerOptions s_jsonSerializerOptions = new(JsonSerializerDefaults.Web);
Process\LaunchSettingsProfile.cs (1)
16private static readonly JsonSerializerOptions s_serializerOptions = new(JsonSerializerDefaults.Web)
Microsoft.AspNetCore.Authentication.BearerToken (4)
AccessTokenResponse.cs (4)
18/// This is serialized as "tokenType": "Bearer" using <see cref="JsonSerializerDefaults.Web"/>. 26/// This is serialized as "accessToken": "{AccessToken}" using <see cref="JsonSerializerDefaults.Web"/>. 34/// This is serialized as "expiresIn": "{ExpiresInSeconds}" using <see cref="JsonSerializerDefaults.Web"/>. 42/// This is serialized as "refreshToken": "{RefreshToken}" using using <see cref="JsonSerializerDefaults.Web"/>.
Microsoft.AspNetCore.Http.Extensions (1)
JsonOptions.cs (1)
16internal static readonly JsonSerializerOptions DefaultSerializerOptions = new JsonSerializerOptions(JsonSerializerDefaults.Web)
Microsoft.AspNetCore.Identity (2)
IdentityJsonSerializerContext.cs (1)
17JsonSerializerDefaults.Web,
IdentityJsonSerializerContext.g.cs (1)
14private readonly static global::System.Text.Json.JsonSerializerOptions s_defaultOptions = new(global::System.Text.Json.JsonSerializerDefaults.Web)
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (4)
Internal\DictionaryAdapterTest.cs (1)
242var serializerOptions = new JsonSerializerOptions(JsonSerializerDefaults.Web) { PropertyNameCaseInsensitive = true };
JsonPatchDocumentTest.cs (3)
193var options = new JsonSerializerOptions(JsonSerializerDefaults.Web); 213var options = new JsonSerializerOptions(JsonSerializerDefaults.Web); 239var compatibleSerializerOption = new JsonSerializerOptions(JsonSerializerDefaults.Web);
Microsoft.AspNetCore.Mvc.Core (1)
JsonOptions.cs (1)
35public JsonSerializerOptions JsonSerializerOptions { get; } = new JsonSerializerOptions(JsonSerializerDefaults.Web)
Microsoft.AspNetCore.Watch.BrowserRefresh.Tests (2)
BlazorWasmHotReloadMiddlewareTest.cs (2)
231JsonSerializer.SerializeToUtf8Bytes(updates, new JsonSerializerOptions(JsonSerializerDefaults.Web)), 259var bytes = JsonSerializer.SerializeToUtf8Bytes(obj, new JsonSerializerOptions(JsonSerializerDefaults.Web));
Microsoft.DotNet.HotReload.Client.Package (1)
Web\AbstractBrowserRefreshServer.cs (1)
35private static readonly JsonSerializerOptions s_jsonSerializerOptions = new(JsonSerializerDefaults.Web);
Microsoft.DotNet.HotReload.Client.Tests (1)
AbstractBrowserRefreshServer.cs (1)
35private static readonly JsonSerializerOptions s_jsonSerializerOptions = new(JsonSerializerDefaults.Web);
Microsoft.DotNet.HotReload.WebAssembly.Browser (2)
WebAssemblyHotReload.cs (2)
60private static readonly JsonSerializerOptions s_jsonSerializerOptions = new(JsonSerializerDefaults.Web); 150private static readonly WebAssemblyHotReloadJsonSerializerContext jsonContext = new(new(JsonSerializerDefaults.Web));
Microsoft.Extensions.AI.Abstractions (2)
Utilities\AIJsonUtilities.Defaults.cs (2)
76[JsonSourceGenerationOptions(JsonSerializerDefaults.Web, 164[JsonSourceGenerationOptions(JsonSerializerDefaults.Web,
Microsoft.Extensions.AI.AzureAIInference (1)
JsonContext.cs (1)
10[JsonSourceGenerationOptions(JsonSerializerDefaults.Web,
Microsoft.Extensions.AI.Integration.Tests (1)
PromptBasedFunctionCallingChatClient.cs (1)
36private static readonly JsonSerializerOptions _jsonOptions = new(JsonSerializerDefaults.Web)
Microsoft.Extensions.AI.OpenAI (1)
OpenAIJsonContext.cs (1)
11[JsonSourceGenerationOptions(JsonSerializerDefaults.Web,
Microsoft.Extensions.DotNetDeltaApplier.Tests (1)
AbstractBrowserRefreshServer.cs (1)
35private static readonly JsonSerializerOptions s_jsonSerializerOptions = new(JsonSerializerDefaults.Web);
SignalRServerlessWeb (1)
Program.cs (1)
35var jsonSerializerOptions = new JsonSerializerOptions(JsonSerializerDefaults.Web)
System.Net.Http.Json (9)
System\Net\Http\Json\HttpClientJsonExtensions.Delete.cs (4)
27/// <param name="options">Options to control the behavior during serialization. The default options are those specified by <see cref="JsonSerializerDefaults.Web"/>.</param> 42/// <param name="options">Options to control the behavior during serialization. The default options are those specified by <see cref="JsonSerializerDefaults.Web"/>.</param> 57/// <param name="options">Options to control the behavior during serialization. The default options are those specified by <see cref="JsonSerializerDefaults.Web"/>.</param> 72/// <param name="options">Options to control the behavior during serialization. The default options are those specified by <see cref="JsonSerializerDefaults.Web"/>.</param>
System\Net\Http\Json\HttpClientJsonExtensions.Patch.cs (2)
21/// <param name="options">Options to control the behavior during serialization. The default options are those specified by <see cref="JsonSerializerDefaults.Web"/>.</param> 42/// <param name="options">Options to control the behavior during serialization. The default options are those specified by <see cref="JsonSerializerDefaults.Web"/>.</param>
System\Net\Http\Json\HttpContentJsonExtensions.AsyncEnumerable.cs (1)
42/// The default options are those specified by <see cref="JsonSerializerDefaults.Web"/>.</param>
System\Net\Http\Json\JsonContent.cs (2)
49/// <param name="options">Options to control the behavior during serialization, the default options are <see cref="JsonSerializerDefaults.Web"/>.</param> 62/// <param name="options">Options to control the behavior during serialization, the default options are <see cref="JsonSerializerDefaults.Web"/>.</param>
System.Text.Json (16)
src\libraries\System.Text.Json\Common\JsonSerializerDefaults.cs (1)
12/// Specifies that general-purpose values should be used. These are the same settings applied if a <see cref="JsonSerializerDefaults"/> isn't specified.
src\libraries\System.Text.Json\Common\JsonSourceGenerationOptionsAttribute.cs (5)
23/// Constructs a new <see cref="JsonSourceGenerationOptionsAttribute"/> instance with a predefined set of options determined by the specified <see cref="JsonSerializerDefaults"/>. 25/// <param name="defaults">The <see cref="JsonSerializerDefaults"/> to reason about.</param> 27public JsonSourceGenerationOptionsAttribute(JsonSerializerDefaults defaults) 31if (defaults is JsonSerializerDefaults.Web) 37else if (defaults is not JsonSerializerDefaults.General)
System\Text\Json\Serialization\JsonSerializerOptions.cs (10)
42get => field ?? GetOrCreateSingleton(ref field, JsonSerializerDefaults.General); 57get => field ?? GetOrCreateSingleton(ref field, JsonSerializerDefaults.Web); 72get => field ?? GetOrCreateSingleton(ref field, JsonSerializerDefaults.Strict); 167/// Constructs a new <see cref="JsonSerializerOptions"/> instance with a predefined set of options determined by the specified <see cref="JsonSerializerDefaults"/>. 169/// <param name="defaults"> The <see cref="JsonSerializerDefaults"/> to reason about.</param> 170public JsonSerializerOptions(JsonSerializerDefaults defaults) : this() 174if (defaults == JsonSerializerDefaults.Web) 180else if (defaults == JsonSerializerDefaults.Strict) 187else if (defaults != JsonSerializerDefaults.General) 1170JsonSerializerDefaults defaults)
Wasm.Performance.TestApp (1)
Pages_Json_razor.g.cs (1)
272PersonJsonContext personJsonContext = new(new(JsonSerializerDefaults.Web));