9[DebuggerDisplay(
"MemberInfo={MemberInfo}")]
41 internal int Order {
get;
set; }
412 Get =
options.MemberAccessorStrategy.CreatePropertyGetter<T>(propertyInfo);
418 Set =
options.MemberAccessorStrategy.CreatePropertySetter<T>(propertyInfo);
432 if (propertyInfo.JsonPropertyName !=
null)
436 else if (
options.PropertyNamingPolicy ==
null)
443 if (
base.NameAsString ==
null)
448 if (
base.NameAsUtf8Bytes ==
null)
452 if (
base.EscapedNameSection ==
null)
477 Get = propertyInfo.Getter;
478 Set = propertyInfo.Setter;
513 if (
base.IsForTypeInfo)
527 if (
base.IgnoreDefaultValuesOnWrite)
533 if (!
base.PropertyTypeCanBeNull)
542 else if (
base.RuntimeTypeInfo.GenericMethods.IsDefaultValue(
value))
552 if ((
int)
state.Current.PropertyState < 2)
555 writer.WritePropertyNameSection(
base.EscapedNameSection);
566 writer.WriteNullSection(
base.EscapedNameSection);
570 if ((
int)
state.Current.PropertyState < 2)
573 writer.WritePropertyNameSection(
base.EscapedNameSection);
594 if (!
base.PropertyTypeCanBeNull)
598 if (!
base.IgnoreDefaultValuesOnRead)
604 else if (
Converter.CanUseDirectReadOrWrite && !
state.Current.NumberHandling.HasValue)
606 if (!flag || !
base.IgnoreDefaultValuesOnRead || !
base.PropertyTypeCanBeNull)
616 if (!flag || !
base.IgnoreDefaultValuesOnRead || !
base.PropertyTypeCanBeNull ||
state.IsContinuation)
626 if (!
base.DeclaredPropertyType.IsAssignableFrom(
type))
631 else if (!
base.PropertyTypeCanBeNull)
648 if (!
base.PropertyTypeCanBeNull)
655 else if (
Converter.CanUseDirectReadOrWrite && !
state.Current.NumberHandling.HasValue)
int Initialize(int capacity)
static string ConverterForPropertyMustBeValid
static string Format(string resourceFormat, object p1)
static byte[] GetEscapedPropertyNameSection(ReadOnlySpan< byte > utf8Value, JavaScriptEncoder encoder)
string ConvertName(string name)
JavaScriptEncoder? Encoder
JsonNamingPolicy? PropertyNamingPolicy
JsonNumberHandling NumberHandling
JsonIgnoreCondition DefaultIgnoreCondition
bool IgnoreReadOnlyProperties
JsonConverter GetConverterInternal(Type typeToConvert)
bool IgnoreReadOnlyFields
JsonTypeInfo GetOrAddClass(Type type)
bool IsInternalConverterForNumberType
virtual void ReadElementAndSetProperty(object obj, string propertyName, ref Utf8JsonReader reader, JsonSerializerOptions options, ref ReadStack state)
override bool ReadJsonAsObject(ref ReadStack state, ref Utf8JsonReader reader, out object value)
virtual void Initialize(Type parentClassType, Type declaredPropertyType, Type runtimePropertyType, ConverterStrategy runtimeClassType, MemberInfo memberInfo, bool isVirtual, JsonConverter converter, JsonIgnoreCondition? ignoreCondition, JsonNumberHandling? parentTypeNumberHandling, JsonSerializerOptions options)
bool SrcGen_HasJsonInclude
static readonly JsonPropertyInfo s_missingProperty
void InitializeForSourceGen(JsonSerializerOptions options, JsonPropertyInfoValues< T > propertyInfo)
override bool GetMemberAndWriteJson(object obj, ref WriteStack state, Utf8JsonWriter writer)
bool _propertyTypeEqualsTypeToConvert
JsonConverter< T > Converter
Type? RuntimePropertyType
bool ReadJsonAndAddExtensionProperty(object obj, ref ReadStack state, ref Utf8JsonReader reader)
override bool ReadJsonAndSetMember(object obj, ref ReadStack state, ref Utf8JsonReader reader)
bool ReadJsonAsObject(ref ReadStack state, ref Utf8JsonReader reader, out object value)
bool PropertyTypeCanBeNull
void DetermineIgnoreCondition(JsonIgnoreCondition? ignoreCondition)
static JsonPropertyInfo CreateIgnoredPropertyPlaceholder(MemberInfo memberInfo, Type memberType, bool isVirtual, JsonSerializerOptions options)
override void Initialize(Type parentClassType, Type declaredPropertyType, Type runtimePropertyType, ConverterStrategy runtimeClassType, MemberInfo memberInfo, bool isVirtual, JsonConverter converter, JsonIgnoreCondition? ignoreCondition, JsonNumberHandling? parentTypeNumberHandling, JsonSerializerOptions options)
bool ReadJsonExtensionDataValue(ref ReadStack state, ref Utf8JsonReader reader, out object value)
void SetExtensionDictionaryAsObject(object obj, object extensionDict)
bool GetMemberAndWriteJson(object obj, ref WriteStack state, Utf8JsonWriter writer)
bool ReadJsonAndSetMember(object obj, ref ReadStack state, ref Utf8JsonReader reader)
object GetValueAsObject(object obj)
bool GetMemberAndWriteJsonExtensionData(object obj, ref WriteStack state, Utf8JsonWriter writer)
void DetermineSerializationCapabilities(JsonIgnoreCondition? ignoreCondition)
override void InitializeForTypeInfo(Type declaredType, JsonTypeInfo runtimeTypeInfo, JsonConverter converter, JsonSerializerOptions options)
JsonNumberHandling? NumberHandling
void DeterminePropertyName()
override bool GetMemberAndWriteJsonExtensionData(object obj, ref WriteStack state, Utf8JsonWriter writer)
bool IgnoreDefaultValuesOnRead
override object GetValueAsObject(object obj)
bool IgnoreDefaultValuesOnWrite
Type DeclaredPropertyType
override void SetExtensionDictionaryAsObject(object obj, object extensionDict)
void DetermineNumberHandlingForTypeInfo(JsonNumberHandling? numberHandling)
ConverterStrategy ConverterStrategy
void InitializeForTypeInfo(Type declaredType, JsonTypeInfo runtimeTypeInfo, JsonConverter converter, JsonSerializerOptions options)
byte[] EscapedNameSection
static JsonPropertyInfo GetPropertyPlaceholder()
virtual void GetPolicies(JsonIgnoreCondition? ignoreCondition, JsonNumberHandling? declaringTypeNumberHandling)
void DetermineNumberHandlingForProperty(JsonNumberHandling? propertyNumberHandling, JsonNumberHandling? declaringTypeNumberHandling)
JsonIgnoreCondition? IgnoreCondition
bool NumberHandingIsApplicable()
JsonTypeInfo _runtimeTypeInfo
bool SrcGen_IsExtensionData
static TAttribute GetAttribute< TAttribute >(MemberInfo memberInfo)
JsonSerializerOptions Options
JsonConverter ConverterBase
JsonTypeInfo RuntimeTypeInfo
bool _converterIsExternalAndPolymorphic
static readonly Type ObjectType
JsonTypeInfo? ElementTypeInfo
static void ThrowInvalidOperationException_SerializerPropertyNameNull(Type parentType, JsonPropertyInfo jsonPropertyInfo)
static void ThrowInvalidOperationException_NumberHandlingOnPropertyInvalid(JsonPropertyInfo jsonPropertyInfo)
static void ThrowInvalidCastException_DeserializeUnableToAssignValue(Type typeOfValue, Type declaredType)
static void ThrowInvalidOperationException_DeserializeUnableToAssignNull(Type declaredType)
static void ThrowJsonException_DeserializeUnableToConvertValue(Type propertyType)
static void ThrowInvalidOperationException_IgnoreConditionOnValueTypeInvalid(string clrPropertyName, Type propertyDeclaringType)
static void ThrowJsonException_SerializationConverterWrite(JsonConverter converter)
static ? Type GetType(string typeName, bool throwOnError, bool ignoreCase)
ReferenceHandlingStrategy
static ? Type GetUnderlyingType(Type nullableType)