1 type derived from JsonPropertyInfo
System.Text.Json (1)
System\Text\Json\Serialization\Metadata\JsonPropertyInfoOfT.cs (1)
14internal sealed class JsonPropertyInfo<T> : JsonPropertyInfo
159 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 (7)
Extensions\JsonNodeSchemaExtensions.cs (2)
448/// <param name="propertyInfo">The <see cref="JsonPropertyInfo" /> associated with the schema.</param> 449internal static void ApplyNullabilityContextInfo(this JsonNode schema, JsonPropertyInfo propertyInfo)
Services\Schemas\OpenApiSchemaService.cs (2)
174JsonPropertyInfo? jsonPropertyInfo, 207foreach (var propertyInfo in jsonTypeInfo.Properties)
Transformers\OpenApiSchemaTransformerContext.cs (3)
15private JsonPropertyInfo? _jsonPropertyInfo; 34/// Gets the <see cref="JsonPropertyInfo"/> associated with the target schema if the 46internal void UpdateJsonTypeInfo(JsonTypeInfo jsonTypeInfo, JsonPropertyInfo? jsonPropertyInfo)
Microsoft.AspNetCore.OpenApi.Tests (1)
Services\OpenApiSchemaService\OpenApiSchemaService.RequestBodySchemas.cs (1)
496foreach (var propertyInfo in jsonTypeInfo.Properties)
Microsoft.Extensions.AI.Abstractions (2)
Utilities\AIJsonSchemaCreateContext.cs (2)
46/// Gets the <see cref="JsonPropertyInfo"/> if the schema is being generated for a property. 48public JsonPropertyInfo? PropertyInfo => _exporterContext.PropertyInfo;
Shared (13)
JsonSchemaExporter\JsonSchemaExporter.cs (6)
92JsonPropertyInfo? propertyInfo = null, 261Func<JsonPropertyInfo, ParameterInfo?>? parameterInfoMapper = 265foreach (JsonPropertyInfo property in typeInfo.Properties) 486private readonly Dictionary<(JsonTypeInfo, JsonPropertyInfo?), string[]> _generated = new(); 520(JsonTypeInfo, JsonPropertyInfo?) key = (context.TypeInfo, context.PropertyInfo); 544JsonPropertyInfo? propertyInfo,
JsonSchemaExporter\JsonSchemaExporter.ReflectionHelpers.cs (4)
50public static string? GetMemberName(JsonPropertyInfo propertyInfo) 55PropertyInfo? memberName = typeof(JsonPropertyInfo).GetProperty("MemberName", AllInstance); 119JsonPropertyInfo? propertyInfo) 142public static Func<JsonPropertyInfo, ParameterInfo?>? ResolveJsonConstructorParameterMapper(
JsonSchemaExporter\JsonSchemaExporterContext.cs (3)
27JsonPropertyInfo? propertyInfo, 62/// Gets the <see cref="JsonPropertyInfo"/> if the schema is being generated for a property. 64public JsonPropertyInfo? PropertyInfo { get; }
System.Text.Json (132)
System\Text\Json\Schema\JsonSchemaExporter.cs (5)
69JsonPropertyInfo? propertyInfo = null, 228foreach (JsonPropertyInfo property in typeInfo.Properties) 411private readonly Dictionary<(JsonTypeInfo, JsonPropertyInfo?), string[]> _generated = new(); 438(JsonTypeInfo TypeInfo, JsonPropertyInfo? PropertyInfo) key = (context.TypeInfo, context.PropertyInfo); 458public JsonSchemaExporterContext CreateContext(JsonTypeInfo typeInfo, JsonPropertyInfo? propertyInfo, JsonTypeInfo? baseTypeInfo)
System\Text\Json\Schema\JsonSchemaExporterContext.cs (3)
17JsonPropertyInfo? propertyInfo, 33/// The <see cref="JsonPropertyInfo"/> if the schema is being generated for a property. 35public JsonPropertyInfo? PropertyInfo { get; }
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 (9)
161JsonPropertyInfo jsonPropertyInfo; 296JsonPropertyInfo jsonPropertyInfo = JsonSerializer.LookupProperty( 338foreach (JsonPropertyInfo jsonPropertyInfo in jsonTypeInfo.PropertyCache) 355JsonPropertyInfo? extensionDataProperty = jsonTypeInfo.ExtensionDataProperty; 386ReadOnlySpan<JsonPropertyInfo> propertyCache = jsonTypeInfo.PropertyCache; 389JsonPropertyInfo jsonPropertyInfo = propertyCache[state.Current.EnumeratorIndex]; 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 (8)
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?>; 79JsonPropertyInfo jsonPropertyInfo = properties[i].Item1; 221JsonPropertyInfo jsonPropertyInfo = argumentState.FoundPropertiesAsync![i].Item1; 315out JsonPropertyInfo jsonPropertyInfo, 398JsonPropertyInfo? jsonPropertyInfo; 498JsonPropertyInfo jsonPropertyInfo) 601out JsonPropertyInfo jsonPropertyInfo,
System\Text\Json\Serialization\JsonConverterOfT.cs (1)
227JsonPropertyInfo? propertyInfo = state.Current.JsonPropertyInfo;
System\Text\Json\Serialization\JsonSerializer.Read.HandlePropertyName.cs (5)
19internal static JsonPropertyInfo LookupProperty( 30JsonPropertyInfo? jsonPropertyInfo = jsonTypeInfo.GetProperty( 52if (jsonTypeInfo.ExtensionDataProperty is JsonPropertyInfo { HasGetter: true, HasSetter: true } dataExtProperty) 68jsonPropertyInfo = JsonPropertyInfo.s_missingProperty; 107JsonPropertyInfo jsonPropertyInfo,
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (10)
209JsonPropertyInfo? jsonPropertyInfo = CreatePropertyInfo(typeInfo, typeToConvert, memberInfo, nullabilityCtx, typeInfo.Options, shouldCheckForRequiredKeyword, hasJsonIncludeAttribute); 222private static JsonPropertyInfo? CreatePropertyInfo( 253JsonPropertyInfo jsonPropertyInfo = typeInfo.CreatePropertyUsingReflection(typeToConvert, declaringType: memberInfo.DeclaringType); 276private static bool PropertyIsOverriddenAndIgnored(PropertyInfo propertyInfo, Dictionary<string, JsonPropertyInfo>? ignoredMembers) 279ignoredMembers?.TryGetValue(propertyInfo.Name, out JsonPropertyInfo? ignoredMember) == true && 323JsonPropertyInfo jsonPropertyInfo, 364private static void DeterminePropertyPolicies(JsonPropertyInfo propertyInfo, MemberInfo memberInfo) 376private static void DeterminePropertyName(JsonPropertyInfo propertyInfo, MemberInfo memberInfo) 401private static void DeterminePropertyIsRequired(JsonPropertyInfo propertyInfo, MemberInfo memberInfo, bool shouldCheckForRequiredKeyword) 470private static void DeterminePropertyNullability(JsonPropertyInfo propertyInfo, MemberInfo memberInfo, NullabilityInfoContext nullabilityCtx)
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)
134internal static void PopulateProperties(JsonTypeInfo typeInfo, JsonTypeInfo.JsonPropertyInfoList propertyList, Func<JsonSerializerContext, JsonPropertyInfo[]> propInitFunc) 142JsonPropertyInfo[] properties = propInitFunc(context!); 148foreach (JsonPropertyInfo jsonPropertyInfo in properties) 205JsonPropertyInfo propertyInfo,
System\Text\Json\Serialization\Metadata\JsonObjectInfoValuesOfT.cs (1)
33public Func<JsonSerializerContext, JsonPropertyInfo[]>? PropertyMetadataInitializer { get; init; }
System\Text\Json\Serialization\Metadata\JsonParameterInfo.cs (3)
15internal JsonParameterInfo(JsonParameterInfoValues parameterInfoValues, JsonPropertyInfo matchingProperty) 73/// This setting is in sync with the associated <see cref="JsonPropertyInfo.IsSetNullable"/> property. 115internal JsonPropertyInfo MatchingProperty { get; }
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (18)
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. 232/// The <see cref="JsonPropertyInfo"/> instance has been locked for further modification. 268/// The <see cref="JsonPropertyInfo"/> instance has been locked for further modification. 307/// The <see cref="JsonPropertyInfo"/> instance has been locked for further modification. 339/// The <see cref="JsonPropertyInfo"/> instance has been locked for further modification. 386internal static JsonPropertyInfo GetPropertyPlaceholder() 388JsonPropertyInfo info = new JsonPropertyInfo<object>(typeof(object), declaringTypeInfo: null, options: null!); 737/// Creates a <see cref="JsonPropertyInfo"/> instance whose type matches that of the current property. 780/// The <see cref="JsonPropertyInfo"/> instance has been locked for further modification. 783/// The value of <see cref="Name"/> cannot conflict with that of other <see cref="JsonPropertyInfo"/> defined in the declaring <see cref="JsonTypeInfo"/>. 830/// The <see cref="JsonPropertyInfo"/> instance has been locked for further modification. 1017/// The <see cref="JsonPropertyInfo"/> instance has been locked for further modification. 1072internal bool IsOverriddenOrShadowedBy(JsonPropertyInfo other)
System\Text\Json\Serialization\Metadata\JsonPropertyInfoValuesOfT.cs (1)
87/// Provides a <see cref="ICustomAttributeProvider"/> factory that maps to <see cref="JsonPropertyInfo.AttributeProvider"/>.
System\Text\Json\Serialization\Metadata\JsonTypeInfo.Cache.cs (6)
43internal ReadOnlySpan<JsonPropertyInfo> PropertyCache 52private JsonPropertyInfo[]? _propertyCache; 55internal Dictionary<string, JsonPropertyInfo> PropertyIndex 64private Dictionary<string, JsonPropertyInfo>? _propertyIndex; 77internal JsonPropertyInfo? GetProperty(ReadOnlySpan<byte> propertyName, ref ReadStackFrame frame, out byte[] utf8PropertyName) 146if (PropertyIndex.TryLookupUtf8Key(propertyName, out JsonPropertyInfo? info) &&
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (25)
232/// Gets the list of <see cref="JsonPropertyInfo"/> metadata corresponding to the current type. 238/// The order of <see cref="JsonPropertyInfo"/> entries in the list determines the serialization order, 239/// unless either of the entries specifies a non-zero <see cref="JsonPropertyInfo.Order"/> value, 240/// in which case the properties will be stable sorted by <see cref="JsonPropertyInfo.Order"/>. 242/// It is required that added <see cref="JsonPropertyInfo"/> entries are unique up to <see cref="JsonPropertyInfo.Name"/>, 245public IList<JsonPropertyInfo> Properties => PropertyList; 273internal Func<JsonSerializerContext, JsonPropertyInfo[]>? SourceGenDelayedPropertyInitializer 284private Func<JsonSerializerContext, JsonPropertyInfo[]>? _sourceGenDelayedPropertyInitializer; 354internal JsonPropertyInfo? ExtensionDataProperty { get; private set; } 471/// Dummy <see cref="JsonPropertyInfo"/> instance corresponding to the declaring type of this <see cref="JsonTypeInfo"/>. 481internal JsonPropertyInfo PropertyInfoForTypeInfo { get; } 483private protected abstract JsonPropertyInfo CreatePropertyInfoForTypeInfo(); 635/// The <see cref="JsonPropertyInfo"/> instance has been locked for further modification. 829foreach (JsonPropertyInfo property in _properties) 984/// Creates a blank <see cref="JsonPropertyInfo"/> instance for the current <see cref="JsonTypeInfo"/>. 988/// <returns>A blank <see cref="JsonPropertyInfo"/> instance.</returns> 994public JsonPropertyInfo CreateJsonPropertyInfo(Type propertyType, string name) 1012JsonPropertyInfo propertyInfo = CreatePropertyUsingReflection(propertyType, declaringType: null); 1020internal JsonPropertyInfo CreatePropertyUsingReflection(Type propertyType, Type? declaringType) 1022JsonPropertyInfo jsonPropertyInfo; 1036jsonPropertyInfo = (JsonPropertyInfo)propertyInfoType.CreateInstanceNoWrapExceptions( 1048private protected abstract JsonPropertyInfo CreateJsonPropertyInfo(JsonTypeInfo declaringTypeInfo, Type? declaringType, JsonSerializerOptions options); 1066public Dictionary<string, (JsonPropertyInfo, int index)> AddedProperties = new(options.PropertyNameCaseInsensitive ? StringComparer.OrdinalIgnoreCase : StringComparer.Ordinal); 1067public Dictionary<string, JsonPropertyInfo>? IgnoredProperties;
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.cs (3)
111foreach (JsonPropertyInfo propertyInfo in PropertyList) 138private protected override JsonPropertyInfo CreatePropertyInfoForTypeInfo() 150private protected override JsonPropertyInfo CreateJsonPropertyInfo(JsonTypeInfo declaringTypeInfo, Type? declaringType, JsonSerializerOptions options)
System\Text\Json\Serialization\Metadata\PolymorphicTypeResolver.cs (1)
100foreach (JsonPropertyInfo property in derivedTypeInfo.JsonTypeInfo.Properties)
System\Text\Json\Serialization\Metadata\PropertyRef.cs (4)
11/// Represents a UTF-8 encoded JSON property name and its associated <see cref="JsonPropertyInfo"/>, if available. 15internal readonly struct PropertyRef(ulong key, JsonPropertyInfo? info, byte[] utf8PropertyName) : IEquatable<PropertyRef> 28/// The <see cref="JsonPropertyInfo"/> associated with the property name, if available. 30public readonly JsonPropertyInfo? Info = info;
System\Text\Json\Serialization\ReadStack.cs (1)
35public readonly JsonPropertyInfo? ParentProperty
System\Text\Json\Serialization\ReadStackFrame.cs (2)
19public JsonPropertyInfo? JsonPropertyInfo; 131public void MarkRequiredPropertyAsRead(JsonPropertyInfo propertyInfo)
System\Text\Json\Serialization\WriteStackFrame.cs (1)
39public JsonPropertyInfo? JsonPropertyInfo;
System\Text\Json\ThrowHelper.Serialization.cs (15)
86public static void ThrowInvalidOperationException_ObjectCreationHandlingPopulateNotSupportedByConverter(JsonPropertyInfo propertyInfo) 92public static void ThrowInvalidOperationException_ObjectCreationHandlingPropertyMustHaveAGetter(JsonPropertyInfo propertyInfo) 98public static void ThrowInvalidOperationException_ObjectCreationHandlingPropertyValueTypeMustHaveASetter(JsonPropertyInfo propertyInfo) 104public static void ThrowInvalidOperationException_ObjectCreationHandlingPropertyCannotAllowPolymorphicDeserialization(JsonPropertyInfo propertyInfo) 110public static void ThrowInvalidOperationException_ObjectCreationHandlingPropertyCannotAllowReadOnlyMember(JsonPropertyInfo propertyInfo) 273public static void ThrowInvalidOperationException_SerializerPropertyNameNull(JsonPropertyInfo jsonPropertyInfo) 279public static void ThrowInvalidOperationException_JsonPropertyRequiredAndNotDeserializable(JsonPropertyInfo jsonPropertyInfo) 285public static void ThrowInvalidOperationException_JsonPropertyRequiredAndExtensionData(JsonPropertyInfo jsonPropertyInfo) 299foreach (JsonPropertyInfo property in parent.PropertyCache) 367public static void ThrowInvalidOperationException_ExtensionDataCannotBindToCtorParam(string propertyName, JsonPropertyInfo jsonPropertyInfo) 385public static void ThrowInvalidOperationException_NumberHandlingOnPropertyInvalid(JsonPropertyInfo jsonPropertyInfo) 543public static void ThrowInvalidOperationException_ExtensionDataConflictsWithUnmappedMemberHandling(Type classType, JsonPropertyInfo jsonPropertyInfo) 549public static void ThrowInvalidOperationException_SerializationDataExtensionPropertyInvalid(JsonPropertyInfo jsonPropertyInfo) 555public static void ThrowInvalidOperationException_PropertyTypeNotNullable(JsonPropertyInfo jsonPropertyInfo) 788public static void ThrowInvalidOperationException_JsonPropertyInfoIsBoundToDifferentJsonTypeInfo(JsonPropertyInfo propertyInfo)