1 type derived from JsonPropertyInfo
System.Text.Json (1)
System\Text\Json\Serialization\Metadata\JsonPropertyInfoOfT.cs (1)
14internal sealed class JsonPropertyInfo<T> : JsonPropertyInfo
141 references to JsonPropertyInfo
Microsoft.AspNetCore.Grpc.JsonTranscoding (4)
Internal\Json\MessageTypeInfoResolver.cs (4)
45var propertyInfo = CreatePropertyInfo(typeInfo, field.JsonName, field, isSerializable: true); 57var propertyInfo = CreatePropertyInfo(typeInfo, mapping.Key, mapping.Value, isSerializable: false); 91private JsonPropertyInfo CreatePropertyInfo(JsonTypeInfo typeInfo, string name, FieldDescriptor field, bool isSerializable) 93var propertyInfo = typeInfo.CreateJsonPropertyInfo(
Microsoft.AspNetCore.OpenApi (10)
Schemas\JsonSchemaMapper\JsonSchemaGenerationContext.cs (3)
20internal JsonSchemaGenerationContext(JsonTypeInfo typeInfo, Type? declaringType, JsonPropertyInfo? propertyInfo, ParameterInfo? parameterInfo) 39/// The <see cref="JsonPropertyInfo"/> if the schema is being generated for a property. 41public JsonPropertyInfo? PropertyInfo { get; }
Schemas\JsonSchemaMapper\JsonSchemaMapper.cs (4)
214JsonPropertyInfo? parentPropertyInfo = null, 415Func<JsonPropertyInfo, ParameterInfo?> parameterInfoMapper = ResolveJsonConstructorParameterMapper(typeInfo); 418foreach (JsonPropertyInfo property in typeInfo.Properties) 707public readonly void HandleGenerationCallback(JsonObject schema, JsonTypeInfo typeInfo, Type? parentType, JsonPropertyInfo? propertyInfo, ParameterInfo? parameterInfo)
Schemas\JsonSchemaMapper\JsonSchemaMapper.ReflectionHelpers.cs (3)
42internal static ICustomAttributeProvider? ResolveAttributeProvider(Type? declaringType, JsonPropertyInfo? propertyInfo) 54s_memberNameProperty ??= typeof(JsonPropertyInfo).GetProperty("MemberName", BindingFlags.Instance | BindingFlags.NonPublic)!; 155private static Func<JsonPropertyInfo, ParameterInfo?> ResolveJsonConstructorParameterMapper(JsonTypeInfo typeInfo)
System.Text.Json (127)
System\Text\Json\Serialization\ArgumentState.cs (2)
7using FoundProperties = System.ValueTuple<System.Text.Json.Serialization.Metadata.JsonPropertyInfo, System.Text.Json.JsonReaderState, long, byte[]?, string?>; 8using FoundPropertiesAsync = System.ValueTuple<System.Text.Json.Serialization.Metadata.JsonPropertyInfo, object?, string?>;
System\Text\Json\Serialization\Attributes\JsonObjectCreationHandlingAttribute.cs (1)
14/// When default resolvers are used this will be mapped to <see cref="JsonPropertyInfo.ObjectCreationHandling"/>.
System\Text\Json\Serialization\Attributes\JsonRequiredAttribute.cs (1)
14/// this attribute will be mapped to <see cref="JsonPropertyInfo.IsRequired"/>.
System\Text\Json\Serialization\Converters\Object\ObjectDefaultConverter.cs (10)
161JsonPropertyInfo jsonPropertyInfo; 294JsonPropertyInfo jsonPropertyInfo = JsonSerializer.LookupProperty( 336List<KeyValuePair<string, JsonPropertyInfo>> properties = jsonTypeInfo.PropertyCache!.List; 339JsonPropertyInfo jsonPropertyInfo = properties[i].Value; 355JsonPropertyInfo? extensionDataProperty = jsonTypeInfo.ExtensionDataProperty; 386List<KeyValuePair<string, JsonPropertyInfo>> propertyList = jsonTypeInfo.PropertyCache!.List; 389JsonPropertyInfo jsonPropertyInfo = propertyList[state.Current.EnumeratorIndex].Value; 418JsonPropertyInfo? extensionDataProperty = jsonTypeInfo.ExtensionDataProperty; 462JsonPropertyInfo jsonPropertyInfo, 496protected static bool ReadAheadPropertyValue(scoped ref ReadStack state, ref Utf8JsonReader reader, JsonPropertyInfo jsonPropertyInfo)
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.cs (7)
11using FoundProperty = System.ValueTuple<System.Text.Json.Serialization.Metadata.JsonPropertyInfo, System.Text.Json.JsonReaderState, long, byte[]?, string?>; 12using FoundPropertyAsync = System.ValueTuple<System.Text.Json.Serialization.Metadata.JsonPropertyInfo, object?, string?>; 74JsonPropertyInfo jsonPropertyInfo = properties[i].Item1; 211JsonPropertyInfo jsonPropertyInfo = argumentState.FoundPropertiesAsync![i].Item1; 338JsonPropertyInfo jsonPropertyInfo = JsonSerializer.LookupProperty( 401JsonPropertyInfo? jsonPropertyInfo; 513JsonPropertyInfo jsonPropertyInfo)
System\Text\Json\Serialization\JsonConverterOfT.cs (1)
231JsonPropertyInfo? propertyInfo = state.Current.JsonPropertyInfo;
System\Text\Json\Serialization\JsonSerializer.Read.HandlePropertyName.cs (5)
19internal static JsonPropertyInfo LookupProperty( 38JsonPropertyInfo jsonPropertyInfo = jsonTypeInfo.GetProperty( 50if (jsonPropertyInfo == JsonPropertyInfo.s_missingProperty) 60if (jsonTypeInfo.ExtensionDataProperty is JsonPropertyInfo { HasGetter: true, HasSetter: true } dataExtProperty) 110JsonPropertyInfo jsonPropertyInfo,
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (9)
218JsonPropertyInfo? jsonPropertyInfo = CreatePropertyInfo(typeInfo, typeToConvert, memberInfo, typeInfo.Options, shouldCheckForRequiredKeyword, hasJsonIncludeAttribute); 231private static JsonPropertyInfo? CreatePropertyInfo( 261JsonPropertyInfo jsonPropertyInfo = typeInfo.CreatePropertyUsingReflection(typeToConvert, declaringType: memberInfo.DeclaringType); 284private static bool PropertyIsOverriddenAndIgnored(PropertyInfo propertyInfo, Dictionary<string, JsonPropertyInfo>? ignoredMembers) 287ignoredMembers?.TryGetValue(propertyInfo.Name, out JsonPropertyInfo? ignoredMember) == true && 328JsonPropertyInfo jsonPropertyInfo, 367private static void DeterminePropertyPolicies(JsonPropertyInfo propertyInfo, MemberInfo memberInfo) 379private static void DeterminePropertyName(JsonPropertyInfo propertyInfo, MemberInfo memberInfo) 404private static void DeterminePropertyIsRequired(JsonPropertyInfo propertyInfo, MemberInfo memberInfo, bool shouldCheckForRequiredKeyword)
System\Text\Json\Serialization\Metadata\JsonMetadataServices.cs (2)
21/// <returns>A <see cref="JsonPropertyInfo"/> instance initialized with the provided metadata.</returns> 23public static JsonPropertyInfo CreatePropertyInfo<T>(JsonSerializerOptions options, JsonPropertyInfoValues<T> propertyInfo)
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Helpers.cs (4)
128internal static void PopulateProperties(JsonTypeInfo typeInfo, JsonTypeInfo.JsonPropertyInfoList propertyList, Func<JsonSerializerContext, JsonPropertyInfo[]> propInitFunc) 136JsonPropertyInfo[] properties = propInitFunc(context!); 142foreach (JsonPropertyInfo jsonPropertyInfo in properties) 199JsonPropertyInfo propertyInfo,
System\Text\Json\Serialization\Metadata\JsonObjectInfoValuesOfT.cs (1)
32public Func<JsonSerializerContext, JsonPropertyInfo[]>? PropertyMetadataInitializer { get; init; }
System\Text\Json\Serialization\Metadata\JsonParameterInfo.cs (2)
36public JsonPropertyInfo MatchingProperty { get; } 38public JsonParameterInfo(JsonParameterInfoValues parameterInfoValues, JsonPropertyInfo matchingProperty)
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (16)
18internal static readonly JsonPropertyInfo s_missingProperty = GetPropertyPlaceholder(); 40/// The <see cref="JsonPropertyInfo"/> instance has been locked for further modification. 64/// The <see cref="JsonPropertyInfo"/> instance has been locked for further modification. 83/// The <see cref="JsonPropertyInfo"/> instance has been locked for further modification. 110/// The <see cref="JsonPropertyInfo"/> instance has been locked for further modification. 155/// The <see cref="JsonPropertyInfo"/> instance has been locked for further modification. 240/// The <see cref="JsonPropertyInfo"/> instance has been locked for further modification. 272/// The <see cref="JsonPropertyInfo"/> instance has been locked for further modification. 304internal static JsonPropertyInfo GetPropertyPlaceholder() 306JsonPropertyInfo info = new JsonPropertyInfo<object>(typeof(object), declaringTypeInfo: null, options: null!); 637/// Creates a <see cref="JsonPropertyInfo"/> instance whose type matches that of the current property. 699/// The <see cref="JsonPropertyInfo"/> instance has been locked for further modification. 702/// The value of <see cref="Name"/> cannot conflict with that of other <see cref="JsonPropertyInfo"/> defined in the declaring <see cref="JsonTypeInfo"/>. 749/// The <see cref="JsonPropertyInfo"/> instance has been locked for further modification. 936/// The <see cref="JsonPropertyInfo"/> instance has been locked for further modification. 991internal bool IsOverriddenOrShadowedBy(JsonPropertyInfo other)
System\Text\Json\Serialization\Metadata\JsonTypeInfo.Cache.cs (8)
48internal JsonPropertyDictionary<JsonPropertyInfo>? PropertyCache { get; private set; } 60internal JsonPropertyInfo CreatePropertyUsingReflection(Type propertyType, Type? declaringType) 62JsonPropertyInfo jsonPropertyInfo; 76jsonPropertyInfo = (JsonPropertyInfo)propertyInfoType.CreateInstanceNoWrapExceptions( 88private protected abstract JsonPropertyInfo CreateJsonPropertyInfo(JsonTypeInfo declaringTypeInfo, Type? declaringType, JsonSerializerOptions options); 92internal JsonPropertyInfo GetProperty( 167if (PropertyCache!.TryGetValue(JsonHelpers.Utf8GetString(propertyName), out JsonPropertyInfo? info)) 208info = JsonPropertyInfo.s_missingProperty;
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (35)
204/// Gets the list of <see cref="JsonPropertyInfo"/> metadata corresponding to the current type. 210/// The order of <see cref="JsonPropertyInfo"/> entries in the list determines the serialization order, 211/// unless either of the entries specifies a non-zero <see cref="JsonPropertyInfo.Order"/> value, 212/// in which case the properties will be stable sorted by <see cref="JsonPropertyInfo.Order"/>. 214/// It is required that added <see cref="JsonPropertyInfo"/> entries are unique up to <see cref="JsonPropertyInfo.Name"/>, 217public IList<JsonPropertyInfo> Properties => PropertyList; 245internal Func<JsonSerializerContext, JsonPropertyInfo[]>? SourceGenDelayedPropertyInitializer 256private Func<JsonSerializerContext, JsonPropertyInfo[]>? _sourceGenDelayedPropertyInitializer; 326internal JsonPropertyInfo? ExtensionDataProperty { get; private set; } 443/// Dummy <see cref="JsonPropertyInfo"/> instance corresponding to the declaring type of this <see cref="JsonTypeInfo"/>. 453internal JsonPropertyInfo PropertyInfoForTypeInfo { get; } 455private protected abstract JsonPropertyInfo CreatePropertyInfoForTypeInfo(); 761foreach (JsonPropertyInfo property in _properties) 845foreach (JsonPropertyInfo pi in PropertyCache!.Values) 955/// Creates a blank <see cref="JsonPropertyInfo"/> instance for the current <see cref="JsonTypeInfo"/>. 959/// <returns>A blank <see cref="JsonPropertyInfo"/> instance.</returns> 965public JsonPropertyInfo CreateJsonPropertyInfo(Type propertyType, string name) 983JsonPropertyInfo propertyInfo = CreatePropertyUsingReflection(propertyType, declaringType: null); 1006public Dictionary<string, (JsonPropertyInfo, int index)> AddedProperties = new(options.PropertyNameCaseInsensitive ? StringComparer.OrdinalIgnoreCase : StringComparer.Ordinal); 1007public Dictionary<string, JsonPropertyInfo>? IgnoredProperties; 1038public ParameterLookupValue(JsonPropertyInfo jsonPropertyInfo) 1044public JsonPropertyInfo JsonPropertyInfo { get; } 1054JsonPropertyDictionary<JsonPropertyInfo> propertyCache = CreatePropertyCache(capacity: properties.Count); 1060foreach (JsonPropertyInfo property in properties) 1135foreach (KeyValuePair<string, JsonPropertyInfo> kvp in PropertyCache.List) 1137JsonPropertyInfo jsonProperty = kvp.Value; 1169JsonPropertyInfo jsonPropertyInfo = matchingEntry.JsonPropertyInfo; 1296internal JsonPropertyDictionary<JsonPropertyInfo> CreatePropertyCache(int capacity) 1298return new JsonPropertyDictionary<JsonPropertyInfo>(Options.PropertyNameCaseInsensitive, capacity); 1326internal sealed class JsonPropertyInfoList : ConfigurationList<JsonPropertyInfo> 1349protected override void ValidateAddedValue(JsonPropertyInfo item) 1362public void AddPropertyWithConflictResolution(JsonPropertyInfo jsonPropertyInfo, ref PropertyHierarchyResolutionState state) 1378(JsonPropertyInfo other, int index) = state.AddedProperties[jsonPropertyInfo.Name]; 1397(state.IgnoredProperties?.TryGetValue(memberName, out JsonPropertyInfo? ignored) == true && jsonPropertyInfo.IsOverriddenOrShadowedBy(ignored));
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.cs (2)
122private protected override JsonPropertyInfo CreatePropertyInfoForTypeInfo() 134private protected override JsonPropertyInfo CreateJsonPropertyInfo(JsonTypeInfo declaringTypeInfo, Type? declaringType, JsonSerializerOptions options)
System\Text\Json\Serialization\Metadata\PropertyRef.cs (2)
8public PropertyRef(ulong key, JsonPropertyInfo info, byte[] nameFromJson) 16public readonly JsonPropertyInfo Info;
System\Text\Json\Serialization\ReadStack.cs (1)
35public readonly JsonPropertyInfo? ParentProperty
System\Text\Json\Serialization\ReadStackFrame.cs (2)
19public JsonPropertyInfo? JsonPropertyInfo; 129public void MarkRequiredPropertyAsRead(JsonPropertyInfo propertyInfo)
System\Text\Json\Serialization\WriteStackFrame.cs (1)
39public JsonPropertyInfo? JsonPropertyInfo;
System\Text\Json\ThrowHelper.Serialization.cs (15)
67public static void ThrowInvalidOperationException_ObjectCreationHandlingPopulateNotSupportedByConverter(JsonPropertyInfo propertyInfo) 73public static void ThrowInvalidOperationException_ObjectCreationHandlingPropertyMustHaveAGetter(JsonPropertyInfo propertyInfo) 79public static void ThrowInvalidOperationException_ObjectCreationHandlingPropertyValueTypeMustHaveASetter(JsonPropertyInfo propertyInfo) 85public static void ThrowInvalidOperationException_ObjectCreationHandlingPropertyCannotAllowPolymorphicDeserialization(JsonPropertyInfo propertyInfo) 91public static void ThrowInvalidOperationException_ObjectCreationHandlingPropertyCannotAllowReadOnlyMember(JsonPropertyInfo propertyInfo) 254public static void ThrowInvalidOperationException_SerializerPropertyNameNull(JsonPropertyInfo jsonPropertyInfo) 260public static void ThrowInvalidOperationException_JsonPropertyRequiredAndNotDeserializable(JsonPropertyInfo jsonPropertyInfo) 266public static void ThrowInvalidOperationException_JsonPropertyRequiredAndExtensionData(JsonPropertyInfo jsonPropertyInfo) 282foreach (KeyValuePair<string, JsonPropertyInfo> kvp in parent.PropertyCache.List) 284JsonPropertyInfo property = kvp.Value; 350public static void ThrowInvalidOperationException_ExtensionDataCannotBindToCtorParam(string propertyName, JsonPropertyInfo jsonPropertyInfo) 368public static void ThrowInvalidOperationException_NumberHandlingOnPropertyInvalid(JsonPropertyInfo jsonPropertyInfo) 520public static void ThrowInvalidOperationException_ExtensionDataConflictsWithUnmappedMemberHandling(Type classType, JsonPropertyInfo jsonPropertyInfo) 526public static void ThrowInvalidOperationException_SerializationDataExtensionPropertyInvalid(JsonPropertyInfo jsonPropertyInfo) 759public static void ThrowInvalidOperationException_JsonPropertyInfoIsBoundToDifferentJsonTypeInfo(JsonPropertyInfo propertyInfo)