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