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