1 type derived from JsonTypeInfo
System.Text.Json (1)
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.cs (1)
13public sealed partial class JsonTypeInfo<T> : JsonTypeInfo
655 references to JsonTypeInfo
Aspire.Hosting.RemoteHost (1)
Ats\AtsMarshaller.cs (1)
605var typeInfo = s_jsonOptions.GetTypeInfo(targetType);
dotnet (60)
_generated\105\WorkloadSearchVersionsJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\116\WorkloadHistoryJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\124\PackInfoJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\137\NugetSearchApiJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\147\SdkVulnerabilityJsonContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\15\CliSchemaJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\154\SlnfJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\168\TelemetryDiskLoggerJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\175\LocalToolsCacheJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
16public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 18Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 22global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\185\SdkVulnerabilityCacheJsonContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\33\RunFileApiJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\37\CSharpCompilerCommandJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
16public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 18Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 22global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\50\RunFileJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\55\SdkCheckJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\67\ToolListJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\72\GlobalJsonWorkloadSetsJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\77\WorkloadInstallJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\82\WorkloadManifestUpdaterJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\90\InstallStateJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\98\WorkloadListJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
dotnet-dev-certs (3)
_generated\8\DevCertsJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
dotnet-user-jwts (3)
_generated\12\JwtSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
dotnet-user-secrets (3)
_generated\3\SecretManagerJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
Microsoft.AspNetCore.Authentication.BearerToken (3)
_generated\5\BearerTokenJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
Microsoft.AspNetCore.Components.Endpoints (15)
_generated\15\ResourceCollectionSerializerContext.GetJsonTypeInfo.g.cs (3)
16public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 18Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 22global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\28\BrowserConfigurationJsonContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\6\ImportMapSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\62\JsonTempDataSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\68\PrerenderComponentApplicationStoreSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
Microsoft.AspNetCore.Components.Server (6)
_generated\15\PrerenderComponentApplicationStoreSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\9\CircuitPersistenceManagerSerializerContext.GetJsonTypeInfo.g.cs (3)
16public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 18Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 22global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
Microsoft.AspNetCore.Components.Web (4)
_generated\11\WebRendererSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
src\aspnetcore\src\Components\Shared\src\JsonSerialization\JsonConverterFactoryTypeInfoResolver.cs (1)
21public JsonTypeInfo? GetTypeInfo(Type type, JsonSerializerOptions options)
Microsoft.AspNetCore.Diagnostics (3)
_generated\8\ExtensionsExceptionJsonContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
Microsoft.AspNetCore.Hosting (3)
_generated\12\SourceGenerationContext.GetJsonTypeInfo.g.cs (3)
16public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 18Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 22global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
Microsoft.AspNetCore.Http.Extensions (15)
_generated\12\ProblemDetailsJsonContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
HttpRequestJsonExtensions.cs (1)
176JsonTypeInfo jsonTypeInfo,
HttpResponseJsonExtensions.cs (2)
158JsonTypeInfo jsonTypeInfo, 174static async Task WriteAsJsonAsyncSlow(HttpResponse response, object? value, JsonTypeInfo jsonTypeInfo,
RequestDelegateFactory.cs (5)
1152var jsonTypeInfo = factoryContext.JsonSerializerOptions.GetReadOnlyTypeInfo(typeArg); 1200var jsonTypeInfo = factoryContext.JsonSerializerOptions.GetReadOnlyTypeInfo(typeArg); 1243var jsonTypeInfo = factoryContext.JsonSerializerOptions.GetReadOnlyTypeInfo(returnType); 1309var jsonTypeInfo = factoryContext.JsonSerializerOptions.GetReadOnlyTypeInfo(bodyType); 1385JsonTypeInfo jsonTypeInfo)
src\aspnetcore\src\Shared\Json\JsonSerializerExtensions.cs (4)
13public static bool HasKnownPolymorphism(this JsonTypeInfo jsonTypeInfo) 16public static bool ShouldUseWith(this JsonTypeInfo jsonTypeInfo, [NotNullWhen(false)] Type? runtimeType) 19public static JsonTypeInfo GetReadOnlyTypeInfo(this JsonSerializerOptions options, Type type) 25public static JsonTypeInfo GetRequiredTypeInfo(this JsonSerializerContext context, Type type)
Microsoft.AspNetCore.Http.Results (8)
JsonHttpResultOfT.cs (1)
72internal JsonTypeInfo? JsonTypeInfo { get; init; }
Results.cs (1)
201public static IResult Json(object? data, JsonTypeInfo jsonTypeInfo, string? contentType = null, int? statusCode = null)
ServerSentEventsResult.cs (2)
83var jsonTypeInfo = jsonOptions.SerializerOptions.GetTypeInfo(typeof(T)); 86var typeInfo = jsonTypeInfo.ShouldUseWith(runtimeType)
src\aspnetcore\src\Shared\Json\JsonSerializerExtensions.cs (4)
13public static bool HasKnownPolymorphism(this JsonTypeInfo jsonTypeInfo) 16public static bool ShouldUseWith(this JsonTypeInfo jsonTypeInfo, [NotNullWhen(false)] Type? runtimeType) 19public static JsonTypeInfo GetReadOnlyTypeInfo(this JsonSerializerOptions options, Type type) 25public static JsonTypeInfo GetRequiredTypeInfo(this JsonSerializerContext context, Type type)
Microsoft.AspNetCore.Identity (8)
_generated\0\GeneratedRouteBuilderExtensions.g.cs (2)
1390private static bool HasKnownPolymorphism(this JsonTypeInfo jsonTypeInfo) 1393private static bool ShouldUseWith(this JsonTypeInfo jsonTypeInfo, [NotNullWhen(false)] Type? runtimeType)
_generated\18\IdentityEndpointsJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\51\IdentityJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
Microsoft.AspNetCore.Mvc.Core (6)
Formatters\SystemTextJsonOutputFormatter.cs (2)
74JsonTypeInfo? jsonTypeInfo = null; 77var declaredTypeJsonInfo = SerializerOptions.GetTypeInfo(context.ObjectType);
src\aspnetcore\src\Shared\Json\JsonSerializerExtensions.cs (4)
13public static bool HasKnownPolymorphism(this JsonTypeInfo jsonTypeInfo) 16public static bool ShouldUseWith(this JsonTypeInfo jsonTypeInfo, [NotNullWhen(false)] Type? runtimeType) 19public static JsonTypeInfo GetReadOnlyTypeInfo(this JsonSerializerOptions options, Type type) 25public static JsonTypeInfo GetRequiredTypeInfo(this JsonSerializerContext context, Type type)
Microsoft.AspNetCore.Routing (4)
src\aspnetcore\src\Shared\Json\JsonSerializerExtensions.cs (4)
13public static bool HasKnownPolymorphism(this JsonTypeInfo jsonTypeInfo) 16public static bool ShouldUseWith(this JsonTypeInfo jsonTypeInfo, [NotNullWhen(false)] Type? runtimeType) 19public static JsonTypeInfo GetReadOnlyTypeInfo(this JsonSerializerOptions options, Type type) 25public static JsonTypeInfo GetRequiredTypeInfo(this JsonSerializerContext context, Type type)
Microsoft.AspNetCore.StaticAssets (3)
_generated\13\StaticAssetsManifestJsonContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
Microsoft.Diagnostics.DataContractReader (3)
_generated\14\ContractDescriptorContext.GetJsonTypeInfo.g.cs (3)
16public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 18Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 22global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
Microsoft.DotNet.Cli.Definitions (3)
_generated\4\GlobalJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
16public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 18Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 22global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
Microsoft.DotNet.HotReload.WebAssembly.Browser (3)
_generated\10\WebAssemblyHotReloadJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
Microsoft.DotNet.ProjectTools (3)
_generated\6\LaunchProfileJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
Microsoft.DotNet.TemplateLocator (6)
_generated\12\InstallStateJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\4\WorkloadSetJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
Microsoft.Extensions.AI (4)
ChatCompletion\OpenTelemetryChatClient.cs (3)
466JsonTypeInfo? unknownContentTypeInfo = 467customContentSerializerOptions?.TryGetTypeInfo(content.GetType(), out JsonTypeInfo? ctsi) is true ? ctsi : 468_defaultOptions.TryGetTypeInfo(content.GetType(), out JsonTypeInfo? dtsi) ? dtsi :
TelemetryHelpers.cs (1)
21if (options?.TryGetTypeInfo(typeof(T), out var typeInfo) is true ||
Microsoft.Extensions.AI.Abstractions (7)
Functions\AIFunctionFactory.cs (3)
832JsonTypeInfo? typeInfo = serializerOptions.GetTypeInfo(parameterType); 903JsonTypeInfo returnTypeInfo; 1059static async ValueTask<object?> SerializeResultAsync(object? result, JsonTypeInfo returnTypeInfo, CancellationToken cancellationToken)
Utilities\AIJsonSchemaCreateContext.cs (3)
36/// Gets the <see cref="JsonTypeInfo"/> for the type being processed. 38public JsonTypeInfo TypeInfo => _exporterContext.TypeInfo; 43public JsonTypeInfo? BaseTypeInfo => _exporterContext.BaseTypeInfo;
Utilities\AIJsonUtilities.cs (1)
88JsonTypeInfo jti = serializerOptions.GetTypeInfo(typeof(object));
Microsoft.Extensions.AI.Abstractions.Tests (2)
Utilities\AIJsonUtilitiesTests.cs (2)
600JsonTypeInfo typeInfo = options.GetTypeInfo(testData.Type); 1568JsonTypeInfo typeInfo = options.GetTypeInfo(testData.Type);
Microsoft.Extensions.AI.Evaluation.Reporting (2)
JsonSerialization\EvaluationContextConverter.cs (2)
68JsonTypeInfo contentsTypeInfo = options.GetTypeInfo(typeof(IReadOnlyList<AIContent>)); 90JsonTypeInfo contentsTypeInfo = options.GetTypeInfo(typeof(IReadOnlyList<AIContent>));
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (2)
src\Libraries\Microsoft.Extensions.AI.Evaluation.Reporting\CSharp\JsonSerialization\EvaluationContextConverter.cs (2)
68JsonTypeInfo contentsTypeInfo = options.GetTypeInfo(typeof(IReadOnlyList<AIContent>)); 90JsonTypeInfo contentsTypeInfo = options.GetTypeInfo(typeof(IReadOnlyList<AIContent>));
Microsoft.Maui (5)
Core\IHybridWebView.cs (1)
67 JsonTypeInfo?[]? paramJsonTypeInfos = null);
Primitives\HybridWebViewInvokeJavaScriptRequest.cs (4)
6 public class HybridWebViewInvokeJavaScriptRequest(string methodName, JsonTypeInfo? returnTypeJsonTypeInfo, object?[]? paramValues, JsonTypeInfo?[]? paramJsonTypeInfos) 10 public JsonTypeInfo? ReturnTypeJsonTypeInfo { get; } = returnTypeJsonTypeInfo; 12 public JsonTypeInfo?[]? ParamJsonTypeInfos { get; } = paramJsonTypeInfos;
Microsoft.Maui.Controls (2)
HybridWebView\HybridWebView.cs (2)
88 JsonTypeInfo?[]? paramJsonTypeInfos = null) 117 JsonTypeInfo?[]? paramJsonTypeInfos = null)
Microsoft.ML.Tokenizers (3)
ModelSourceGenerationContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
Microsoft.NET.Build.Tasks (9)
_generated\14\WorkloadSetJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\22\InstallStateJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\8\SdkVulnerabilitySummaryContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
Microsoft.NET.Sdk.StaticWebAssets.Tasks (9)
_generated\30\StaticWebAssetsJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\43\DefineStaticWebAssetsSerializerContext.GetJsonTypeInfo.g.cs (3)
16public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 18Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 22global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\50\ImportMapSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
Microsoft.NET.Sdk.WorkloadManifestReader (6)
_generated\12\InstallStateJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\4\WorkloadSetJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
Microsoft.TemplateEngine.Edge (9)
_generated\18\SettingsStoreJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\44\TemplateCacheJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\8\GlobalSettingsJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
NuGet.CommandLine.XPlat (3)
_generated\36\PackageSearchJsonContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
NuGet.Packaging (3)
_generated\4\NupkgMetadataSerializationContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
NuGet.ProjectModel (6)
_generated\12\CacheFileSourceGen.GetJsonTypeInfo.g.cs (3)
16public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 18Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 22global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\23\AssetsLogMessageSourceGen.GetJsonTypeInfo.g.cs (3)
16public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 18Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 22global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
NuGet.Protocol (15)
_generated\143\JsonContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\155\RepositorySignatureJsonContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\36\PackageSearchJsonContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\41\PluginCacheJsonContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
_generated\95\PluginJsonContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
sdk-tasks (3)
_generated\5\SdkTasksJsonSerializerContext.GetJsonTypeInfo.g.cs (3)
14public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) 16Options.TryGetTypeInfo(type, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? typeInfo); 20global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver.GetTypeInfo(global::System.Type type, global::System.Text.Json.JsonSerializerOptions options)
System.Memory.Data (2)
System\BinaryData.cs (2)
391/// <param name="jsonTypeInfo">The <see cref="JsonTypeInfo"/> to use when serializing to JSON.</param> 458/// <param name="jsonTypeInfo">The <see cref="JsonTypeInfo"/> to use when serializing to JSON.</param>
System.Net.Http.Json (4)
System\Net\Http\Json\JsonContent.cs (3)
18private readonly JsonTypeInfo _typeInfo; 24JsonTypeInfo jsonTypeInfo, 96public static JsonContent Create(object? inputValue, JsonTypeInfo jsonTypeInfo, MediaTypeHeaderValue? mediaType = null)
System\Net\Http\Json\JsonHelpers.cs (1)
17internal static JsonTypeInfo GetJsonTypeInfo(Type type, JsonSerializerOptions? options)
System.Text.Json (393)
System\Text\Json\Nodes\JsonValue.cs (1)
79/// <param name="jsonTypeInfo">The <see cref="JsonTypeInfo"/> that will be used to serialize the value.</param>
System\Text\Json\Schema\JsonSchemaExporter.cs (13)
16/// Functionality for exporting JSON schema from serialization contracts defined in <see cref="JsonTypeInfo"/>. 33JsonTypeInfo typeInfo = options.GetTypeInfoInternal(type); 43public static JsonNode GetJsonSchemaAsNode(this JsonTypeInfo typeInfo, JsonSchemaExporterOptions? exporterOptions = null) 58JsonTypeInfo typeInfo, 62JsonTypeInfo? parentPolymorphicTypeInfo = null, 124JsonTypeInfo derivedTypeInfo = typeInfo.Options.GetTypeInfoInternal(derivedType.DerivedType); 182JsonTypeInfo elementTypeInfo = typeInfo.Options.GetTypeInfo(elementConverter.Type!); 350JsonTypeInfo caseTypeInfo = typeInfo.Options.GetTypeInfoInternal(caseInfo.CaseType); 454private static bool IsPolymorphicTypeThatSpecifiesItselfAsDerivedType(JsonTypeInfo typeInfo) 472private readonly Dictionary<(JsonTypeInfo, JsonPropertyInfo?), string[]> _generated = new(); 499(JsonTypeInfo TypeInfo, JsonPropertyInfo? PropertyInfo) key = (context.TypeInfo, context.PropertyInfo); 519public JsonSchemaExporterContext CreateContext(JsonTypeInfo typeInfo, JsonPropertyInfo? propertyInfo, JsonTypeInfo? baseTypeInfo)
System\Text\Json\Schema\JsonSchemaExporterContext.cs (6)
16JsonTypeInfo typeInfo, 18JsonTypeInfo? baseTypeInfo, 28/// The <see cref="JsonTypeInfo"/> for the type being processed. 30public JsonTypeInfo TypeInfo { get; } 38/// Gets the <see cref="JsonTypeInfo"/> for polymorphic base type if the schema is being generated for a derived type. 40public JsonTypeInfo? BaseTypeInfo { get; }
System\Text\Json\Serialization\Attributes\JsonObjectCreationHandlingAttribute.cs (1)
17/// that support population will be populated. When default resolvers are used this will be mapped to <see cref="JsonTypeInfo.PreferredPropertyObjectCreationHandling"/>.
System\Text\Json\Serialization\Attributes\JsonUnionAttribute.cs (1)
28/// contract customization to populate <see cref="Metadata.JsonTypeInfo.UnionCases"/>
System\Text\Json\Serialization\Converters\Collection\DictionaryDefaultConverter.cs (1)
43JsonTypeInfo typeInfo = state.Current.JsonTypeInfo;
System\Text\Json\Serialization\Converters\Collection\DictionaryOfTKeyTValueConverter.cs (1)
58JsonTypeInfo typeInfo = state.Current.JsonTypeInfo;
System\Text\Json\Serialization\Converters\Collection\ICollectionOfTConverter.cs (1)
40internal override void ConfigureJsonTypeInfo(JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Collection\IDictionaryConverter.cs (2)
66JsonTypeInfo typeInfo = state.Current.JsonTypeInfo; 106internal override void ConfigureJsonTypeInfo(JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Collection\IDictionaryOfTKeyTValueConverter.cs (1)
54internal override void ConfigureJsonTypeInfo(JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Collection\IEnumerableConverterFactory.cs (3)
197JsonTypeInfo.ValidateType(elementType!); 205JsonTypeInfo.ValidateType(elementType!); 206JsonTypeInfo.ValidateType(dictionaryKeyType!);
System\Text\Json\Serialization\Converters\Collection\IListConverter.cs (1)
79internal override void ConfigureJsonTypeInfo(JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Collection\IListOfTConverter.cs (1)
40internal override void ConfigureJsonTypeInfo(JsonTypeInfo jsonTypeInfo, 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 (1)
30JsonTypeInfo typeInfo = state.Current.JsonTypeInfo;
System\Text\Json\Serialization\Converters\Collection\ImmutableEnumerableOfTConverterWithReflection.cs (1)
23internal override void ConfigureJsonTypeInfoUsingReflection(JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Collection\IReadOnlySetOfTConverter.cs (1)
37internal override void ConfigureJsonTypeInfo(JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Collection\ISetOfTConverter.cs (1)
37internal override void ConfigureJsonTypeInfo(JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Collection\JsonCollectionConverter.cs (5)
33JsonTypeInfo typeInfo = state.Current.JsonTypeInfo; 50protected static JsonConverter<TElement> GetElementConverter(JsonTypeInfo elementTypeInfo) 68JsonTypeInfo jsonTypeInfo = state.Current.JsonTypeInfo; 69JsonTypeInfo elementTypeInfo = jsonTypeInfo.ElementTypeInfo!; 306JsonTypeInfo jsonTypeInfo = state.Current.JsonTypeInfo;
System\Text\Json\Serialization\Converters\Collection\JsonDictionaryConverter.cs (6)
48JsonTypeInfo typeInfo = state.Current.JsonTypeInfo; 67protected static JsonConverter<T> GetConverter<T>(JsonTypeInfo typeInfo) 79JsonTypeInfo jsonTypeInfo = state.Current.JsonTypeInfo; 80JsonTypeInfo keyTypeInfo = jsonTypeInfo.KeyTypeInfo!; 81JsonTypeInfo elementTypeInfo = jsonTypeInfo.ElementTypeInfo!; 346JsonTypeInfo jsonTypeInfo = state.Current.JsonTypeInfo;
System\Text\Json\Serialization\Converters\Collection\StackOrQueueConverter.cs (1)
30JsonTypeInfo typeInfo = state.Current.JsonTypeInfo;
System\Text\Json\Serialization\Converters\Collection\StackOrQueueConverterWithReflection.cs (1)
21internal override void ConfigureJsonTypeInfoUsingReflection(JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\FSharp\FSharpUnionConverter.cs (3)
143JsonTypeInfo jsonTypeInfo = options.GetTypeInfoInternal(typeToConvert); 395JsonTypeInfo typeInfo = options.GetTypeInfoInternal(typeof(T)); 453internal override void ConfigureJsonTypeInfo(JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\JsonMetadataServicesConverter.cs (2)
53JsonTypeInfo jsonTypeInfo = state.Current.JsonTypeInfo; 68internal override void ConfigureJsonTypeInfo(JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Node\JsonObjectConverter.cs (1)
13internal override void ConfigureJsonTypeInfo(JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Object\ObjectConverterFactory.cs (2)
79JsonTypeInfo.ValidateType(parameterType); 84Type placeHolderType = JsonTypeInfo.ObjectType;
System\Text\Json\Serialization\Converters\Object\ObjectDefaultConverter.cs (3)
28JsonTypeInfo jsonTypeInfo = state.Current.JsonTypeInfo; 277internal static void PopulatePropertiesFastPath(object obj, JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options, ref Utf8JsonReader reader, scoped ref ReadStack state) 328JsonTypeInfo jsonTypeInfo = state.Current.JsonTypeInfo;
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.cs (2)
26JsonTypeInfo jsonTypeInfo = state.Current.JsonTypeInfo; 591JsonTypeInfo jsonTypeInfo = state.Current.JsonTypeInfo;
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.Large.cs (1)
54JsonTypeInfo typeInfo = state.Current.JsonTypeInfo;
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 (3)
19var createObject = (JsonTypeInfo.ParameterizedConstructorDelegate<T, TArg0, TArg1, TArg2, TArg3>) 91JsonTypeInfo typeInfo = state.Current.JsonTypeInfo; 124internal override void ConfigureJsonTypeInfoUsingReflection(JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Union\JsonUnionConverter.cs (2)
59JsonTypeInfo caseTypeInfo; 191JsonTypeInfo caseTypeInfo = options.GetTypeInfoInternal(caseType);
System\Text\Json\Serialization\Converters\Value\NullableConverter.cs (1)
38JsonTypeInfo previousTypeInfo = state.Current.JsonTypeInfo;
System\Text\Json\Serialization\JsonConverter.cs (4)
60/// Indicates that the converter can consume the <see cref="JsonTypeInfo.CreateObject"/> delegate. 119internal virtual JsonTypeInfo CreateJsonTypeInfo(JsonSerializerOptions options) 251internal virtual void ConfigureJsonTypeInfo(JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options) { } 258internal virtual void ConfigureJsonTypeInfoUsingReflection(JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options) { }
System\Text\Json\Serialization\JsonConverter.MetadataHandling.cs (4)
14internal JsonConverter? ResolvePolymorphicConverter(JsonTypeInfo jsonTypeInfo, ref ReadStack state) 29JsonTypeInfo? resolvedType; 83internal JsonConverter? ResolvePolymorphicConverter(object value, JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options, ref WriteStack state) 110if (resolver.TryGetDerivedJsonTypeInfo(runtimeType, out JsonTypeInfo? derivedJsonTypeInfo, out object? typeDiscriminator))
System\Text\Json\Serialization\JsonConverterOfT.cs (4)
55internal sealed override JsonTypeInfo CreateJsonTypeInfo(JsonSerializerOptions options) 232JsonTypeInfo originalJsonTypeInfo = state.Current.JsonTypeInfo; 377JsonTypeInfo jsonTypeInfo = state.PeekNestedJsonTypeInfo(); 412JsonTypeInfo originalJsonTypeInfo = state.Current.JsonTypeInfo;
System\Text\Json\Serialization\JsonResumableConverterOfT.cs (2)
24JsonTypeInfo jsonTypeInfo = options.GetTypeInfoInternal(typeToConvert); 37JsonTypeInfo typeInfo = options.GetTypeInfoInternal(typeof(T));
System\Text\Json\Serialization\JsonSerializer.Helpers.cs (4)
35private static JsonTypeInfo GetTypeInfo(JsonSerializerOptions? options, Type inputType) 45return inputType == JsonTypeInfo.ObjectType 55private static JsonTypeInfo GetTypeInfo(JsonSerializerContext context, Type inputType) 60JsonTypeInfo? info = context.GetTypeInfo(inputType);
System\Text\Json\Serialization\JsonSerializer.Read.Document.cs (3)
64JsonTypeInfo jsonTypeInfo = GetTypeInfo(options, returnType); 109public static object? Deserialize(this JsonDocument document, JsonTypeInfo jsonTypeInfo) 161JsonTypeInfo jsonTypeInfo = GetTypeInfo(context, returnType);
System\Text\Json\Serialization\JsonSerializer.Read.Element.cs (3)
58JsonTypeInfo jsonTypeInfo = GetTypeInfo(options, returnType); 98public static object? Deserialize(this JsonElement element, JsonTypeInfo jsonTypeInfo) 144JsonTypeInfo jsonTypeInfo = GetTypeInfo(context, returnType);
System\Text\Json\Serialization\JsonSerializer.Read.HandleMetadata.cs (1)
25internal static bool TryReadMetadata(JsonConverter converter, JsonTypeInfo jsonTypeInfo, ref Utf8JsonReader reader, scoped ref ReadStack state)
System\Text\Json\Serialization\JsonSerializer.Read.HandlePropertyName.cs (3)
27JsonTypeInfo jsonTypeInfo = state.Current.JsonTypeInfo; 132genericArgs[1].UnderlyingSystemType == JsonTypeInfo.ObjectType || 143if (jsonPropertyInfo.PropertyType.FullName == JsonTypeInfo.JsonObjectTypeName)
System\Text\Json\Serialization\JsonSerializer.Read.Node.cs (4)
56JsonTypeInfo jsonTypeInfo = GetTypeInfo(options, returnType); 90public static object? Deserialize(this JsonNode? node, JsonTypeInfo jsonTypeInfo) 135JsonTypeInfo jsonTypeInfo = GetTypeInfo(context, returnType); 160private static object? ReadFromNodeAsObject(JsonNode? node, JsonTypeInfo jsonTypeInfo)
System\Text\Json\Serialization\JsonSerializer.Read.Pipe.cs (4)
104JsonTypeInfo jsonTypeInfo, 139/// did not return a compatible <see cref="JsonTypeInfo"/> for <paramref name="returnType"/>. 151JsonTypeInfo jsonTypeInfo = GetTypeInfo(context, returnType); 189JsonTypeInfo jsonTypeInfo = GetTypeInfo(options, returnType);
System\Text\Json\Serialization\JsonSerializer.Read.Span.cs (4)
62JsonTypeInfo jsonTypeInfo = GetTypeInfo(options, returnType); 96public static object? Deserialize(ReadOnlySpan<byte> utf8Json, JsonTypeInfo jsonTypeInfo) 125/// did not return a compatible <see cref="JsonTypeInfo"/> for <paramref name="returnType"/>. 152private static object? ReadFromSpanAsObject(ReadOnlySpan<byte> utf8Json, JsonTypeInfo jsonTypeInfo, int? actualByteCount = null)
System\Text\Json\Serialization\JsonSerializer.Read.Stream.cs (8)
120JsonTypeInfo jsonTypeInfo = GetTypeInfo(options, returnType); 154JsonTypeInfo jsonTypeInfo = GetTypeInfo(options, returnType); 208JsonTypeInfo jsonTypeInfo, 261JsonTypeInfo jsonTypeInfo) 295/// did not return a compatible <see cref="JsonTypeInfo"/> for <paramref name="returnType"/>. 307JsonTypeInfo jsonTypeInfo = GetTypeInfo(context, returnType); 333/// did not return a compatible <see cref="JsonTypeInfo"/> for <paramref name="returnType"/>. 344JsonTypeInfo jsonTypeInfo = GetTypeInfo(context, returnType);
System\Text\Json\Serialization\JsonSerializer.Read.String.cs (7)
121JsonTypeInfo jsonTypeInfo = GetTypeInfo(options, returnType); 160JsonTypeInfo jsonTypeInfo = GetTypeInfo(options, returnType); 257public static object? Deserialize([StringSyntax(StringSyntaxAttribute.Json)] string json, JsonTypeInfo jsonTypeInfo) 284public static object? Deserialize([StringSyntax(StringSyntaxAttribute.Json)] ReadOnlySpan<char> json, JsonTypeInfo jsonTypeInfo) 333JsonTypeInfo jsonTypeInfo = GetTypeInfo(context, returnType); 377JsonTypeInfo jsonTypeInfo = GetTypeInfo(context, returnType); 412private static unsafe object? ReadFromSpanAsObject(ReadOnlySpan<char> json, JsonTypeInfo jsonTypeInfo)
System\Text\Json\Serialization\JsonSerializer.Read.Utf8JsonReader.cs (4)
116JsonTypeInfo jsonTypeInfo = GetTypeInfo(options, returnType); 205public static object? Deserialize(ref Utf8JsonReader reader, JsonTypeInfo jsonTypeInfo) 237/// did not return a compatible <see cref="JsonTypeInfo"/> for <paramref name="returnType"/>. 295private static object? ReadAsObject(ref Utf8JsonReader reader, JsonTypeInfo jsonTypeInfo)
System\Text\Json\Serialization\JsonSerializer.Write.ByteArray.cs (4)
58JsonTypeInfo jsonTypeInfo = GetTypeInfo(options, inputType); 91public static byte[] SerializeToUtf8Bytes(object? value, JsonTypeInfo jsonTypeInfo) 125JsonTypeInfo jsonTypeInfo = GetTypeInfo(context, inputType); 146private static byte[] WriteBytesAsObject(object? value, JsonTypeInfo jsonTypeInfo)
System\Text\Json\Serialization\JsonSerializer.Write.Document.cs (3)
54JsonTypeInfo jsonTypeInfo = GetTypeInfo(options, inputType); 88public static JsonDocument SerializeToDocument(object? value, JsonTypeInfo jsonTypeInfo) 143private static JsonDocument WriteDocumentAsObject(object? value, JsonTypeInfo jsonTypeInfo)
System\Text\Json\Serialization\JsonSerializer.Write.Element.cs (4)
54JsonTypeInfo jsonTypeInfo = GetTypeInfo(options, inputType); 88public static JsonElement SerializeToElement(object? value, JsonTypeInfo jsonTypeInfo) 119JsonTypeInfo typeInfo = GetTypeInfo(context, inputType); 141private static JsonElement WriteElementAsObject(object? value, JsonTypeInfo jsonTypeInfo)
System\Text\Json\Serialization\JsonSerializer.Write.Node.cs (4)
55JsonTypeInfo typeInfo = GetTypeInfo(options, inputType); 89public static JsonNode? SerializeToNode(object? value, JsonTypeInfo jsonTypeInfo) 120JsonTypeInfo jsonTypeInfo = GetTypeInfo(context, inputType); 142private static JsonNode? WriteNodeAsObject(object? value, JsonTypeInfo jsonTypeInfo)
System\Text\Json\Serialization\JsonSerializer.Write.Pipe.cs (3)
89JsonTypeInfo jsonTypeInfo, 129JsonTypeInfo jsonTypeInfo = GetTypeInfo(context, inputType); 165JsonTypeInfo jsonTypeInfo = GetTypeInfo(options, inputType);
System\Text\Json\Serialization\JsonSerializer.Write.Stream.cs (6)
113JsonTypeInfo jsonTypeInfo = GetTypeInfo(options, inputType); 145JsonTypeInfo jsonTypeInfo = GetTypeInfo(options, inputType); 213JsonTypeInfo jsonTypeInfo, 238JsonTypeInfo jsonTypeInfo) 277JsonTypeInfo jsonTypeInfo = GetTypeInfo(context, inputType); 308JsonTypeInfo jsonTypeInfo = GetTypeInfo(context, inputType);
System\Text\Json\Serialization\JsonSerializer.Write.String.cs (6)
65JsonTypeInfo jsonTypeInfo = GetTypeInfo(options, inputType); 104/// encoding since the implementation internally uses UTF-8. See also <see cref="SerializeToUtf8Bytes(object?, JsonTypeInfo)"/> 105/// and <see cref="SerializeAsync(IO.Stream, object?, JsonTypeInfo, Threading.CancellationToken)"/>. 107public static string Serialize(object? value, JsonTypeInfo jsonTypeInfo) 142JsonTypeInfo jsonTypeInfo = GetTypeInfo(context, inputType); 163private static string WriteStringAsObject(object? value, JsonTypeInfo jsonTypeInfo)
System\Text\Json\Serialization\JsonSerializer.Write.Utf8JsonWriter.cs (3)
67JsonTypeInfo jsonTypeInfo = GetTypeInfo(options, inputType); 102public static void Serialize(Utf8JsonWriter writer, object? value, JsonTypeInfo jsonTypeInfo) 138JsonTypeInfo jsonTypeInfo = GetTypeInfo(context, inputType);
System\Text\Json\Serialization\JsonSerializerContext.cs (3)
104/// Returns a <see cref="JsonTypeInfo"/> instance representing the given type. 108public abstract JsonTypeInfo? GetTypeInfo(Type type); 110JsonTypeInfo? IJsonTypeInfoResolver.GetTypeInfo(Type type, JsonSerializerOptions options)
System\Text\Json\Serialization\JsonSerializerOptions.Caching.cs (25)
41private volatile JsonTypeInfo? _lastTypeInfo; 44/// Gets the <see cref="JsonTypeInfo"/> contract metadata resolved by the current <see cref="JsonSerializerOptions"/> instance. 55public JsonTypeInfo GetTypeInfo(Type type) 59if (JsonTypeInfo.IsInvalidForSerialization(type)) 68/// Tries to get the <see cref="JsonTypeInfo"/> contract metadata resolved by the current <see cref="JsonSerializerOptions"/> instance. 80public bool TryGetTypeInfo(Type type, [NotNullWhen(true)] out JsonTypeInfo? typeInfo) 84if (JsonTypeInfo.IsInvalidForSerialization(type)) 127internal JsonTypeInfo? GetTypeInfoInternal( 139JsonTypeInfo? typeInfo = null; 162internal bool TryGetTypeInfoCached(Type type, [NotNullWhen(true)] out JsonTypeInfo? typeInfo) 177internal JsonTypeInfo GetTypeInfoForRootType(Type type, bool fallBackToNearestAncestorType = false) 179JsonTypeInfo? jsonTypeInfo = _lastTypeInfo; 189internal bool TryGetPolymorphicTypeInfoForRootType(object rootValue, [NotNullWhen(true)] out JsonTypeInfo? polymorphicTypeInfo) 194if (runtimeType != JsonTypeInfo.ObjectType) 213internal JsonTypeInfo ObjectTypeInfo 218return _objectTypeInfo ??= GetTypeInfoInternal(JsonTypeInfo.ObjectType); 222private JsonTypeInfo? _objectTypeInfo; 259public JsonTypeInfo? GetOrAddTypeInfo(Type type, bool fallBackToNearestAncestorType = false) 267public bool TryGetTypeInfo(Type type, [NotNullWhen(true)] out JsonTypeInfo? typeInfo) 292JsonTypeInfo? typeInfo = context.Options.GetTypeInfoNoCaching(type); 302private JsonTypeInfo? FallBackToNearestAncestor(Type type, CacheEntry entry) 335if (current == JsonTypeInfo.ObjectType) 392public readonly JsonTypeInfo? TypeInfo; 398public CacheEntry(JsonTypeInfo? typeInfo) 410public JsonTypeInfo? GetResult()
System\Text\Json\Serialization\JsonSerializerOptions.Converters.cs (1)
81JsonTypeInfo jsonTypeInfo = GetTypeInfoInternal(typeToConvert, ensureConfigured: false, resolveIfMutable: true);
System\Text\Json\Serialization\JsonSerializerOptions.cs (6)
226/// Gets or sets the <see cref="JsonTypeInfo"/> contract resolver used by this instance. 260/// Gets the list of chained <see cref="JsonTypeInfo"/> contract resolvers used by this instance. 905/// Read-only instances use caching when querying <see cref="JsonConverter"/> and <see cref="JsonTypeInfo"/> metadata. 1022private JsonTypeInfo? GetTypeInfoNoCaching(Type type) 1030JsonTypeInfo? info = resolver.GetTypeInfo(type, this); 1048if (type == JsonTypeInfo.ObjectType)
System\Text\Json\Serialization\JsonTypeClassifierContext.cs (2)
68/// list mirrors <see cref="JsonTypeInfo.UnionCases"/> on the resolved 69/// <see cref="JsonTypeInfo"/>.
System\Text\Json\Serialization\JsonTypeClassifierFactory.cs (1)
21/// <see cref="JsonTypeInfo"/> configuration, and the returned delegate is invoked
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.cs (8)
41/// <returns>A <see cref="JsonTypeInfo"/> defining a reflection-derived JSON contract for <paramref name="type"/>.</returns> 51public virtual JsonTypeInfo GetTypeInfo(Type type, JsonSerializerOptions options) 58JsonTypeInfo.ValidateType(type); 59JsonTypeInfo typeInfo = CreateJsonTypeInfo(type, options); 68foreach (Action<JsonTypeInfo> modifier in _modifiers) 79private static JsonTypeInfo CreateJsonTypeInfo(Type type, JsonSerializerOptions options) 93public IList<Action<JsonTypeInfo>> Modifiers => _modifiers ??= new ModifierCollection(this); 96private sealed class ModifierCollection : ConfigurationList<Action<JsonTypeInfo>>
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (14)
27private static JsonTypeInfo CreateTypeInfoCore(Type type, JsonConverter converter, JsonSerializerOptions options) 29JsonTypeInfo typeInfo = JsonTypeInfo.CreateJsonTypeInfo(type, converter, options); 84internal static void PopulatePolymorphismMetadata(JsonTypeInfo typeInfo) 117private static void PopulateProperties(JsonTypeInfo typeInfo, NullabilityInfoContext nullabilityCtx) 136JsonTypeInfo.PropertyHierarchyResolutionState state = new(typeInfo.Options); 141if (currentType == JsonTypeInfo.ObjectType || 174JsonTypeInfo typeInfo, 180ref JsonTypeInfo.PropertyHierarchyResolutionState state) 240JsonTypeInfo typeInfo, 248ref JsonTypeInfo.PropertyHierarchyResolutionState state) 264JsonTypeInfo typeInfo, 286if (JsonTypeInfo.IsInvalidForSerialization(typeToConvert)) 339private static void PopulateParameterInfoValues(JsonTypeInfo typeInfo, NullabilityInfoContext nullabilityCtx)
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Union.cs (7)
20internal static void PopulateUnionMetadata(JsonTypeInfo typeInfo) 36public abstract void Build(JsonTypeInfo typeInfo); 46public override void Build(JsonTypeInfo typeInfo) 88/// <see cref="JsonTypeInfo.UnionCases"/> in declaration order. Each ctor overload 94/// time via <see cref="JsonTypeInfo.UnionAmbiguousValueTypes"/>. 133/// Builds the convention-based <see cref="JsonTypeInfo.UnionDeconstructor"/> and 134/// <see cref="JsonTypeInfo.UnionConstructor"/> delegates.
System\Text\Json\Serialization\Metadata\IJsonTypeInfoResolver.cs (3)
12/// Resolves a <see cref="JsonTypeInfo"/> contract for the requested type and options. 17/// A <see cref="JsonTypeInfo"/> instance matching the requested type, 20JsonTypeInfo? GetTypeInfo(Type type, JsonSerializerOptions options);
System\Text\Json\Serialization\Metadata\JsonCollectionInfoValuesOfTCollection.cs (5)
23/// If a dictionary type, the <see cref="JsonTypeInfo"/> instance representing the key type. 26public JsonTypeInfo? KeyInfo { get; init; } 29/// A <see cref="JsonTypeInfo"/> instance representing the element type. 32public JsonTypeInfo ElementInfo { get; init; } = null!; 54/// from the polymorphic type's metadata at <see cref="JsonTypeInfo"/> configuration time.
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Helpers.cs (7)
44typeInfo.CreateObjectForExtensionDataProperty = ((JsonTypeInfo)typeInfo).CreateObject; 119JsonTypeInfo typeInfo, 148private static void PopulateParameterInfoValues(JsonTypeInfo typeInfo, Func<JsonParameterInfoValues[]?>? paramFactory) 163internal static void PopulateProperties(JsonTypeInfo typeInfo, JsonTypeInfo.JsonPropertyInfoList propertyList, Func<JsonSerializerContext, JsonPropertyInfo[]> propInitFunc) 167Debug.Assert(typeInfo.Type != JsonTypeInfo.ObjectType); 175JsonTypeInfo.PropertyHierarchyResolutionState state = new(typeInfo.Options);
System\Text\Json\Serialization\Metadata\JsonObjectInfoValuesOfT.cs (1)
66/// from the polymorphic type's metadata at <see cref="JsonTypeInfo"/> configuration time.
System\Text\Json\Serialization\Metadata\JsonParameterInfo.cs (1)
124internal JsonTypeInfo JsonTypeInfo => MatchingProperty.JsonTypeInfo;
System\Text\Json\Serialization\Metadata\JsonPolymorphismOptions.cs (4)
39/// The parent <see cref="JsonTypeInfo"/> instance has been locked for further modification. 56/// The parent <see cref="JsonTypeInfo"/> instance has been locked for further modification. 74/// The parent <see cref="JsonTypeInfo"/> instance has been locked for further modification. 90internal JsonTypeInfo? DeclaringTypeInfo { get; set; }
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (13)
20internal JsonTypeInfo? DeclaringTypeInfo { get; private set; } 199/// capability of property converter to populate, containing type's <see cref="JsonTypeInfo.PreferredPropertyObjectCreationHandling"/>. 324if (value && !JsonTypeInfo.IsValidExtensionDataProperty(PropertyType)) 374internal JsonPropertyInfo(Type declaringType, Type propertyType, JsonTypeInfo? declaringTypeInfo, JsonSerializerOptions options) 469private protected abstract void DetermineEffectiveConverter(JsonTypeInfo jsonTypeInfo); 733potentialNumberType == JsonTypeInfo.ObjectType; 862object value = converter.Read(ref reader, JsonTypeInfo.ObjectType, Options)!; 883JsonTypeInfo dictionaryValueInfo = 927if (JsonTypeInfo.ElementType == JsonTypeInfo.ObjectType && reader.TokenType == JsonTokenType.Null) 945internal void EnsureChildOf(JsonTypeInfo parent) 977internal JsonTypeInfo JsonTypeInfo 986JsonTypeInfo jsonTypeInfo = _jsonTypeInfo; 996private JsonTypeInfo? _jsonTypeInfo;
System\Text\Json\Serialization\Metadata\JsonPropertyInfoOfT.cs (2)
19internal JsonPropertyInfo(Type declaringType, JsonTypeInfo? declaringTypeInfo, JsonSerializerOptions options) 147private protected override void DetermineEffectiveConverter(JsonTypeInfo jsonTypeInfo)
System\Text\Json\Serialization\Metadata\JsonPropertyInfoValuesOfT.cs (2)
37/// The <see cref="JsonTypeInfo"/> info for the property or field's type. 39public JsonTypeInfo PropertyTypeInfo { get; init; } = null!;
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (47)
80/// The <see cref="JsonTypeInfo"/> instance has been locked for further modification. 111/// The <see cref="JsonTypeInfo"/> instance has been locked for further modification. 141/// The <see cref="JsonTypeInfo"/> instance has been locked for further modification. 171/// The <see cref="JsonTypeInfo"/> instance has been locked for further modification. 207/// The <see cref="JsonTypeInfo"/> instance has been locked for further modification. 293/// <paramref name="value" /> has been associated with a different <see cref="JsonTypeInfo"/> instance. 296/// The <see cref="JsonTypeInfo"/> instance has been locked for further modification. 345/// A <see cref="JsonTypeInfo"/> instance can be locked either if 395private readonly JsonTypeInfo _parent; 397public JsonUnionCaseInfoList(JsonTypeInfo parent, IEnumerable<JsonUnionCaseInfo>? source = null) : base(source) 463/// <c>CaseValue</c> using the <see cref="JsonTypeInfo"/> registered for that case 641internal JsonTypeInfo? ElementTypeInfo 651JsonTypeInfo? elementTypeInfo = _elementTypeInfo; 667internal JsonTypeInfo? KeyTypeInfo 677JsonTypeInfo? keyTypeInfo = _keyTypeInfo; 689private JsonTypeInfo? _elementTypeInfo; 690private JsonTypeInfo? _keyTypeInfo; 693/// Gets the <see cref="JsonSerializerOptions"/> value associated with the current <see cref="JsonTypeInfo" /> instance. 708/// As such, the value of the converter cannot be changed once a <see cref="JsonTypeInfo"/> instance has been created. 728/// Dummy <see cref="JsonPropertyInfo"/> instance corresponding to the declaring type of this <see cref="JsonTypeInfo"/>. 746/// The <see cref="JsonTypeInfo"/> instance has been locked for further modification. 778/// The <see cref="JsonTypeInfo"/> instance has been locked for further modification. 822/// The <see cref="JsonTypeInfo"/> instance has been locked for further modification. 860/// The <see cref="JsonTypeInfo"/> instance has been locked for further modification. 1058/// Validates that a union <see cref="JsonTypeInfo"/> has a well-formed shape after 1180/// This helper operates purely on already-resolved <see cref="JsonTypeInfo"/> / 1185private static void BuildUnionValueTypeMap(IList<JsonUnionCaseInfo> unionCases, JsonSerializerOptions options, JsonTypeInfo target) 1194JsonTypeInfo caseTypeInfo = options.GetTypeInfoInternal(caseType); 1266internal JsonTypeInfo? AncestorPolymorphicType 1283private JsonTypeInfo? _ancestorPolymorhicType; 1383/// which constrains the type of metadata that can be modified in the <see cref="JsonTypeInfo"/> instance. 1396/// Creates a blank <see cref="JsonTypeInfo"/> instance. 1400/// <returns>A blank <see cref="JsonTypeInfo"/> instance.</returns> 1404/// The returned <see cref="JsonTypeInfo"/> will be blank, with the exception of the 1411/// which constrains the type of metadata that can be modified in the <see cref="JsonTypeInfo"/> instance. 1415public static JsonTypeInfo CreateJsonTypeInfo(Type type, JsonSerializerOptions options) 1431internal static JsonTypeInfo CreateJsonTypeInfo(Type type, JsonConverter converter, JsonSerializerOptions options) 1433JsonTypeInfo jsonTypeInfo; 1444jsonTypeInfo = (JsonTypeInfo)jsonTypeInfoType.CreateInstanceNoWrapExceptions( 1454/// Creates a blank <see cref="JsonPropertyInfo"/> instance for the current <see cref="JsonTypeInfo"/>. 1461/// <exception cref="InvalidOperationException">The <see cref="JsonTypeInfo"/> instance has been locked for further modification.</exception> 1487if (Options.TryGetTypeInfoCached(propertyType, out JsonTypeInfo? jsonTypeInfo)) 1500parameterTypes: [typeof(Type), typeof(JsonTypeInfo), typeof(JsonSerializerOptions)], 1511private protected abstract JsonPropertyInfo CreateJsonPropertyInfo(JsonTypeInfo declaringTypeInfo, Type? declaringType, JsonSerializerOptions options); 1793(propertyType.FullName == JsonObjectTypeName && ReferenceEquals(propertyType.Assembly, typeof(JsonTypeInfo).Assembly)); 1827private readonly JsonTypeInfo _jsonTypeInfo; 1829public JsonPropertyInfoList(JsonTypeInfo jsonTypeInfo)
System\Text\Json\Serialization\Metadata\JsonTypeInfoKind.cs (1)
7/// Determines the kind of contract metadata a given <see cref="JsonTypeInfo"/> is specifying.
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.cs (6)
36/// The <see cref="JsonTypeInfo"/> instance has been locked for further modification. 40/// A parameterless factory is not supported for the current metadata <see cref="JsonTypeInfo.Kind"/>. 125/// <see cref="JsonTypeInfo.UnionDeconstructor"/> on the base type. Refer to that 178/// <see cref="JsonTypeInfo.UnionConstructor"/> on the base type. 189/// <see cref="JsonTypeInfo.UnionConstructor"/> for the full null-handling contract. 261private protected override JsonPropertyInfo CreateJsonPropertyInfo(JsonTypeInfo declaringTypeInfo, Type? declaringType, JsonSerializerOptions options)
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.ReadHelper.cs (3)
109internal JsonTypeInfo? _asyncEnumerableArrayTypeInfo; 110internal JsonTypeInfo? _asyncEnumerableRootLevelValueTypeInfo; 111internal JsonTypeInfo? _asyncEnumerableRootLevelSerializer;
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.WriteHelpers.cs (3)
45Options.TryGetPolymorphicTypeInfoForRootType(rootValue, out JsonTypeInfo? derivedTypeInfo)) 141Options.TryGetPolymorphicTypeInfoForRootType(rootValue, out JsonTypeInfo? derivedTypeInfo)) 291Options.TryGetPolymorphicTypeInfoForRootType(rootValue, out JsonTypeInfo? polymorphicTypeInfo))
System\Text\Json\Serialization\Metadata\JsonTypeInfoResolver.cs (5)
61/// <param name="resolver">The source resolver generating <see cref="JsonTypeInfo"/> metadata.</param> 62/// <param name="modifier">The delegate modifying non-null <see cref="JsonTypeInfo"/> results.</param> 68public static IJsonTypeInfoResolver WithAddedModifier(this IJsonTypeInfoResolver resolver, Action<JsonTypeInfo> modifier) 79/// Gets a resolver that returns null <see cref="JsonTypeInfo"/> for every type. 96public JsonTypeInfo? GetTypeInfo(Type type, JsonSerializerOptions options) => null;
System\Text\Json\Serialization\Metadata\JsonTypeInfoResolverChain.cs (2)
13public JsonTypeInfo? GetTypeInfo(Type type, JsonSerializerOptions options) 17JsonTypeInfo? typeInfo = resolver.GetTypeInfo(type, options);
System\Text\Json\Serialization\Metadata\JsonTypeInfoResolverWithAddedModifiers.cs (7)
11private readonly Action<JsonTypeInfo>[] _modifiers; 13public JsonTypeInfoResolverWithAddedModifiers(IJsonTypeInfoResolver source, Action<JsonTypeInfo>[] modifiers) 20public JsonTypeInfoResolverWithAddedModifiers WithAddedModifier(Action<JsonTypeInfo> modifier) 22var newModifiers = new Action<JsonTypeInfo>[_modifiers.Length + 1]; 29public JsonTypeInfo? GetTypeInfo(Type type, JsonSerializerOptions options) 31JsonTypeInfo? typeInfo = _source.GetTypeInfo(type, options); 35foreach (Action<JsonTypeInfo> modifier in _modifiers)
System\Text\Json\Serialization\Metadata\JsonUnionInfoValuesOfT.cs (2)
34/// Refer to <see cref="JsonTypeInfo.UnionDeconstructor"/> for the full <c>(CaseType, CaseValue)</c> 48/// from the union's metadata at <see cref="JsonTypeInfo"/> configuration time.
System\Text\Json\Serialization\Metadata\MemberAccessor.cs (1)
54public abstract JsonTypeInfo.ParameterizedConstructorDelegate<T, TArg0, TArg1, TArg2, TArg3>? CreateParameterizedConstructor<T, TArg0, TArg1, TArg2, TArg3>(ConstructorInfo constructor);
System\Text\Json\Serialization\Metadata\PolymorphicTypeResolver.cs (14)
45JsonTypeInfo derivedTypeInfo = options.GetTypeInfoInternal(derivedType); 120/// Resolves a classifier-returned <see cref="Type"/> to its <see cref="JsonTypeInfo"/> using the registered derived types. 122public bool TryResolveDerivedJsonTypeInfo(Type resolvedType, [NotNullWhen(true)] out JsonTypeInfo? jsonTypeInfo) 141public bool TryGetDerivedJsonTypeInfo(Type runtimeType, [NotNullWhen(true)] out JsonTypeInfo? jsonTypeInfo, out object? typeDiscriminator) 185public bool TryGetDerivedJsonTypeInfo(object typeDiscriminator, [NotNullWhen(true)] out JsonTypeInfo? jsonTypeInfo) 213type != JsonTypeInfo.ObjectType; 276internal static JsonTypeInfo? FindNearestPolymorphicBaseType(JsonTypeInfo typeInfo) 286JsonTypeInfo? matchingResult = null; 291JsonTypeInfo? candidateInfo = ResolveAncestorTypeInfo(candidate, typeInfo.Options); 303JsonTypeInfo? candidateInfo = ResolveAncestorTypeInfo(interfaceType, typeInfo.Options); 334static JsonTypeInfo? ResolveAncestorTypeInfo(Type type, JsonSerializerOptions options) 354public DerivedJsonTypeInfo(object? typeDiscriminator, JsonTypeInfo derivedTypeInfo) 363public JsonTypeInfo JsonTypeInfo { get; }
System\Text\Json\Serialization\Metadata\ReflectionEmitCachingMemberAccessor.cs (1)
61public override JsonTypeInfo.ParameterizedConstructorDelegate<T, TArg0, TArg1, TArg2, TArg3>? CreateParameterizedConstructor<T, TArg0, TArg1, TArg2, TArg3>(ConstructorInfo constructor) =>
System\Text\Json\Serialization\Metadata\ReflectionEmitMemberAccessor.cs (7)
38JsonTypeInfo.ObjectType, 176public override JsonTypeInfo.ParameterizedConstructorDelegate<T, TArg0, TArg1, TArg2, TArg3>? 178CreateDelegate<JsonTypeInfo.ParameterizedConstructorDelegate<T, TArg0, TArg1, TArg2, TArg3>>( 201new[] { JsonTypeInfo.ObjectType }, 347new[] { collectionType, JsonTypeInfo.ObjectType }, 700new[] { JsonTypeInfo.ObjectType }, 716new[] { JsonTypeInfo.ObjectType, memberType },
System\Text\Json\Serialization\Metadata\ReflectionMemberAccessor.cs (2)
73public override JsonTypeInfo.ParameterizedConstructorDelegate<T, TArg0, TArg1, TArg2, TArg3>? 139Type elementType = JsonTypeInfo.ObjectType;
System\Text\Json\Serialization\ReadStack.cs (4)
102internal void Initialize(JsonTypeInfo jsonTypeInfo, bool supportContinuation = false) 132JsonTypeInfo jsonTypeInfo = Current.JsonPropertyInfo?.JsonTypeInfo ?? Current.CtorArgumentState!.JsonParameterInfo!.JsonTypeInfo; 218public JsonConverter InitializePolymorphicReEntry(JsonTypeInfo derivedJsonTypeInfo) 381public JsonTypeInfo GetTopJsonTypeInfoWithParameterizedConstructor()
System\Text\Json\Serialization\ReadStackFrame.cs (5)
46public JsonTypeInfo JsonTypeInfo; 58public JsonTypeInfo? PolymorphicJsonTypeInfo; 61public JsonTypeInfo BaseJsonTypeInfo 148internal void InitializePropertiesValidationState(JsonTypeInfo typeInfo) 160internal void ValidateAllRequiredPropertiesAreRead(JsonTypeInfo typeInfo)
System\Text\Json\Serialization\WriteStack.cs (3)
145JsonTypeInfo jsonTypeInfo, 178public readonly JsonTypeInfo PeekNestedJsonTypeInfo() 201JsonTypeInfo jsonTypeInfo = Current.GetNestedJsonTypeInfo();
System\Text\Json\Serialization\WriteStackFrame.cs (8)
36/// For objects, it is either the actual (real) JsonPropertyInfo or the <see cref="JsonTypeInfo.PropertyInfoForTypeInfo"/> for the class. 37/// For collections, it is the <see cref="JsonTypeInfo.PropertyInfoForTypeInfo"/> for the class and current element. 49public JsonTypeInfo JsonTypeInfo; 79public JsonTypeInfo? PolymorphicTypeInfo; 108public readonly JsonTypeInfo GetNestedJsonTypeInfo() 118public JsonTypeInfo InitializePolymorphicReEntry(Type runtimeType, JsonSerializerOptions options) 129JsonTypeInfo typeInfo = options.GetTypeInfoInternal(runtimeType, fallBackToNearestAncestorType: true); 140public JsonConverter InitializePolymorphicReEntry(JsonTypeInfo derivedJsonTypeInfo)
System\Text\Json\ThrowHelper.Serialization.cs (3)
303public static void ThrowJsonException_JsonRequiredPropertyMissing(JsonTypeInfo parent, BitArray assignedOrNotRequiredPropertiesSet) 465JsonTypeInfo jsonTypeInfo = state.GetTopJsonTypeInfoWithParameterizedConstructor(); 685public static void ThrowNotSupportedException_DeserializeNoConstructor(JsonTypeInfo typeInfo, ref Utf8JsonReader reader, scoped ref ReadStack state)