11 instantiations of DefaultJsonTypeInfoResolver
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
Internal\Json\JsonConverterHelper.cs (1)
42new DefaultJsonTypeInfoResolver());
Microsoft.AspNetCore.Http.Extensions (1)
JsonOptions.cs (1)
39=> new DefaultJsonTypeInfoResolver();
Microsoft.AspNetCore.Http.Extensions.Tests (6)
HttpRequestJsonExtensionsTests.cs (2)
242options.TypeInfoResolver = new DefaultJsonTypeInfoResolver(); 264options.TypeInfoResolver = new DefaultJsonTypeInfoResolver();
HttpResponseJsonExtensionsTests.cs (2)
455options.TypeInfoResolver = new DefaultJsonTypeInfoResolver(); 476options.TypeInfoResolver = new DefaultJsonTypeInfoResolver();
ProblemDetailsDefaultWriterTest.cs (1)
332options.SerializerOptions.TypeInfoResolver = new DefaultJsonTypeInfoResolver();
ProblemDetailsServiceCollectionExtensionsTest.cs (1)
197collection.ConfigureAll<JsonOptions>(options => options.SerializerOptions.TypeInfoResolver = new DefaultJsonTypeInfoResolver());
Microsoft.AspNetCore.Http.Results (1)
JsonHttpResultOfT.cs (1)
41jsonSerializerOptions.TypeInfoResolver ??= new DefaultJsonTypeInfoResolver();
Microsoft.AspNetCore.Mvc.Core (1)
JsonOptions.cs (1)
49=> new DefaultJsonTypeInfoResolver();
System.Text.Json (1)
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.cs (1)
138var newInstance = new DefaultJsonTypeInfoResolver(mutable: false);
54 references to DefaultJsonTypeInfoResolver
Microsoft.AspNetCore.Http.Extensions.Tests (3)
JsonOptionsTests.cs (1)
45Assert.IsType<DefaultJsonTypeInfoResolver>(options.TypeInfoResolver);
ProblemDetailsServiceCollectionExtensionsTest.cs (2)
208Assert.IsNotType<DefaultJsonTypeInfoResolver>(jsonOptions.Value.SerializerOptions.TypeInfoResolver); 237Assert.IsType<DefaultJsonTypeInfoResolver>(jsonOptions.Value.SerializerOptions.TypeInfoResolverChain[2]);
Microsoft.AspNetCore.Mvc.Core.Test (2)
Formatters\SystemTextJsonOutputFormatterTest.cs (1)
289Assert.IsType<DefaultJsonTypeInfoResolver>(stjOutputFormatter.SerializerOptions.TypeInfoResolver);
JsonOptionsTest.cs (1)
44Assert.IsType<DefaultJsonTypeInfoResolver>(options.TypeInfoResolver);
System.Text.Json (49)
System\Text\Json\Serialization\Attributes\JsonRequiredAttribute.cs (1)
13/// For contracts originating from <see cref="DefaultJsonTypeInfoResolver"/> or <see cref="JsonSerializerContext"/>,
System\Text\Json\Serialization\Converters\Collection\ImmutableDictionaryOfTKeyTValueConverterWithReflection.cs (1)
26jsonTypeInfo.CreateObjectWithArgs = DefaultJsonTypeInfoResolver.MemberAccessor.CreateImmutableDictionaryCreateRangeDelegate<TCollection, TKey, TValue>();
System\Text\Json\Serialization\Converters\Collection\ImmutableEnumerableOfTConverterWithReflection.cs (1)
25jsonTypeInfo.CreateObjectWithArgs = DefaultJsonTypeInfoResolver.MemberAccessor.CreateImmutableEnumerableCreateRangeDelegate<TCollection, TElement>();
System\Text\Json\Serialization\Converters\Collection\StackOrQueueConverterWithReflection.cs (1)
23jsonTypeInfo.AddMethodDelegate = DefaultJsonTypeInfoResolver.MemberAccessor.CreateAddMethodDelegate<TCollection>();
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.Large.Reflection.cs (1)
27jsonTypeInfo.CreateObjectWithArgs = DefaultJsonTypeInfoResolver.MemberAccessor.CreateParameterizedConstructor<T>(ConstructorInfo!);
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.Small.cs (1)
126jsonTypeInfo.CreateObjectWithArgs = DefaultJsonTypeInfoResolver.MemberAccessor.CreateParameterizedConstructor<T, TArg0, TArg1, TArg2, TArg3>(ConstructorInfo!);
System\Text\Json\Serialization\JsonConverterOfT.cs (1)
671if (result is null && DefaultJsonTypeInfoResolver.TryGetDefaultSimpleConverter(Type, out JsonConverter? defaultConverter))
System\Text\Json\Serialization\JsonSerializer.Helpers.cs (1)
18/// should be set to use the reflection-based <see cref="DefaultJsonTypeInfoResolver"/>.
System\Text\Json\Serialization\JsonSerializerOptions.Converters.cs (1)
54return DefaultJsonTypeInfoResolver.GetConverterForType(typeToConvert, this);
System\Text\Json\Serialization\JsonSerializerOptions.cs (4)
219/// A <see langword="null"/> setting is equivalent to using the reflection-based <see cref="DefaultJsonTypeInfoResolver" />. 932DefaultJsonTypeInfoResolver defaultResolver = DefaultJsonTypeInfoResolver.DefaultInstance; 1135? DefaultJsonTypeInfoResolver.DefaultInstance
System\Text\Json\Serialization\JsonSerializerOptionsUpdateHandler.cs (1)
26DefaultJsonTypeInfoResolver.ClearMemberAccessorCaches();
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.cs (8)
21/// Creates a mutable <see cref="DefaultJsonTypeInfoResolver"/> instance. 105private readonly DefaultJsonTypeInfoResolver _resolver; 107public ModifierCollection(DefaultJsonTypeInfoResolver resolver) 125=> _modifiers is null or { Count: 0 } && GetType() == typeof(DefaultJsonTypeInfoResolver); 127internal static DefaultJsonTypeInfoResolver DefaultInstance 133if (s_defaultInstance is DefaultJsonTypeInfoResolver result) 138var newInstance = new DefaultJsonTypeInfoResolver(mutable: false); 143private static DefaultJsonTypeInfoResolver? s_defaultInstance;
System\Text\Json\Serialization\Metadata\JsonParameterInfo.cs (1)
66/// Contracts originating from <see cref="DefaultJsonTypeInfoResolver"/> or <see cref="JsonSerializerContext"/>,
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (10)
45/// For contracts originating from <see cref="DefaultJsonTypeInfoResolver"/>, the value of 117/// For contracts originating from <see cref="DefaultJsonTypeInfoResolver"/>, 239/// Contracts originating from <see cref="DefaultJsonTypeInfoResolver"/> or <see cref="JsonSerializerContext"/>, 275/// Contracts originating from <see cref="DefaultJsonTypeInfoResolver"/> or <see cref="JsonSerializerContext"/>, 314/// For contracts originating from <see cref="DefaultJsonTypeInfoResolver"/> or <see cref="JsonSerializerContext"/>, 342/// For contracts originating from <see cref="DefaultJsonTypeInfoResolver"/> or <see cref="JsonSerializerContext"/>, 345/// For contracts using <see cref="DefaultJsonTypeInfoResolver"/>, properties using the <see langword="required"/> keyword 785/// For contracts originating from <see cref="DefaultJsonTypeInfoResolver"/> or <see cref="JsonSerializerContext"/>, 833/// For contracts originating from <see cref="DefaultJsonTypeInfoResolver"/> or <see cref="JsonSerializerContext"/>, 1020/// For contracts originating from <see cref="DefaultJsonTypeInfoResolver"/> or <see cref="JsonSerializerContext"/>,
System\Text\Json\Serialization\Metadata\JsonPropertyInfoOfT.cs (1)
145=> DefaultJsonTypeInfoResolver.DeterminePropertyAccessors<T>(this, memberInfo, useNonPublicAccessors);
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (11)
87/// For contracts originating from <see cref="DefaultJsonTypeInfoResolver"/> or <see cref="JsonSerializerContext"/>, 116/// For contracts originating from <see cref="DefaultJsonTypeInfoResolver"/> or <see cref="JsonSerializerContext"/>, 146/// For contracts originating from <see cref="DefaultJsonTypeInfoResolver"/> or <see cref="JsonSerializerContext"/>, 176/// For contracts originating from <see cref="DefaultJsonTypeInfoResolver"/> or <see cref="JsonSerializerContext"/>, 212/// For contracts originating from <see cref="DefaultJsonTypeInfoResolver"/> or <see cref="JsonSerializerContext"/>, 301/// For contracts originating from <see cref="DefaultJsonTypeInfoResolver"/> or <see cref="JsonSerializerContext"/>, 495/// For contracts originating from <see cref="DefaultJsonTypeInfoResolver"/> or <see cref="JsonSerializerContext"/>, 531/// For contracts originating from <see cref="DefaultJsonTypeInfoResolver"/> or <see cref="JsonSerializerContext"/>, 575/// For contracts originating from <see cref="DefaultJsonTypeInfoResolver"/> or <see cref="JsonSerializerContext"/>, 914JsonConverter converter = DefaultJsonTypeInfoResolver.GetConverterForType(typeof(T), options, resolveJsonConverterAttribute: false); 955JsonConverter converter = DefaultJsonTypeInfoResolver.GetConverterForType(type, options, resolveJsonConverterAttribute: false);
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.cs (1)
45/// For contracts originating from <see cref="DefaultJsonTypeInfoResolver"/> or <see cref="JsonSerializerContext"/>,
System\Text\Json\Serialization\Metadata\JsonTypeInfoResolver.cs (3)
24/// It can also be used to fall back to <see cref="DefaultJsonTypeInfoResolver"/> wherever necessary. 48/// It can also be used to fall back to <see cref="DefaultJsonTypeInfoResolver"/> wherever necessary. 68/// This method is closely related to <see cref="DefaultJsonTypeInfoResolver.Modifiers"/> property