154 ex.Source =
"System.Text.Json.Rethrowable";
259 long lineNumber =
json.CurrentState._lineNumber;
261 resourceString +=
$" LineNumber: {lineNumber} | BytePositionInLine: {bytePositionInLine}.";
279 return $"0x{value:X2}";
281 char c = (char)
value;
418 for (
int i = 0; i < num; i++)
432 if (num <
value.Length)
470 ex.Source =
"System.Text.Json.Rethrowable";
523 ex.Source =
"System.Text.Json.Rethrowable";
568 ex.Source =
"System.Text.Json.Rethrowable";
598 ex.Source =
"System.Text.Json.Rethrowable";
702 AppendPathInformation =
true
726 AppendPathInformation =
true
736 AppendPathInformation =
true
746 AppendPathInformation =
true
756 AppendPathInformation =
true
907 string message =
ex.Message;
908 int num = message.AsSpan().LastIndexOf(
" LineNumber: ");
909 message = ((num < 0) ? (message +
" Path: " +
text +
".") :
$"{message.Substring(0, num)} Path: {text} |{message.Substring(num)}");
924 long lineNumber = reader.CurrentState._lineNumber;
930 if (
string.IsNullOrEmpty(
text2))
932 Type type =
state.Current.JsonPropertyInfo?.RuntimePropertyType;
940 if (
ex.AppendPathInformation)
942 text2 +=
$" Path: {value} | LineNumber: {lineNumber} | BytePositionInLine: {bytePositionInLine}.";
960 if (
string.IsNullOrEmpty(
text3))
965 if (
ex.AppendPathInformation)
1008 string text =
ex.Message;
1009 Type type =
state.Current.JsonPropertyInfo?.RuntimePropertyType;
1014 if (!
text.Contains(
type.ToString()))
1016 if (
text.Length > 0)
1022 long lineNumber = reader.CurrentState._lineNumber;
1024 text +=
$" Path: {state.JsonPath()} | LineNumber: {lineNumber} | BytePositionInLine: {bytePositionInLine}.";
1031 string text =
ex.Message;
1032 Type type =
state.Current.DeclaredJsonPropertyInfo?.RuntimePropertyType;
1037 if (!
text.Contains(
type.ToString()))
1039 if (
text.Length > 0)
1127 if (
state.Current.IsProcessingDictionary())
1158 if (!reader.HasValueSequence)
1168 string @
string = reader.GetString();
1197 if (
state.Current.JsonTypeInfo.PropertyInfoForTypeInfo.ConverterBase.ConstructorIsParameterized)
static byte Min(byte val1, byte val2)
static string ExpectedStartOfPropertyNotFound
static string InvalidCharacterAfterEscapeWithinString
static string CannotTranscodeInvalidUtf8
static string NodeArrayTooSmall
static string FormatUInt32
static string CannotWriteValueWithinObject
static string TrailingCommaNotAllowedBeforeArrayEnd
static string DeserializePolymorphicInterface
static string InvalidLeadingZeroInNumber
static string MetadataPreservedArrayPropertyNotFound
static string DeserializeUnableToConvertValue
static string FormatInt16
static string SerializeUnableToSerialize
static string MetadataReferenceNotFound
static string FormatDateTime
static string ObjectDepthTooLarge
static string UnexpectedEndOfDataWhileReadingComment
static string CannotWriteValueAfterPrimitiveOrClose
static string CannotStartObjectArrayAfterPrimitiveOrClose
static string InvalidEndOfJsonNonPrimitive
static string SerializationConverterOnAttributeNotCompatible
static string FormatDateTimeOffset
static string NodeAlreadyHasParent
static string CannotEncodeInvalidUTF16
static string InvalidCharacterAtStartOfComment
static string InvalidCharacterWithinString
static string SerializationDuplicateAttribute
static string ValueTooLarge
static string CannotReadInvalidUTF16
static string CannotWriteEndAfterProperty
static string NodeCollectionIsReadOnly
static string FormatSingle
static string ExpectedTrue
static string InvalidCast
static string FailedToGetLargerSpan
static string MetadataPreservedArrayFailed
static string SerializerOptionsImmutable
static string NodeArrayIndexNegative
static string ConstructorMaxOf64Parameters
static string CannotPopulateCollection
static string ConstructorParamIncompleteBinding
static string SerializationNotSupportedType
static string MetadataInvalidPropertyWithLeadingDollarSign
static string MetadataValueWasNotString
static string ExpectedJsonTokens
static string MissingFSharpCoreMember
static string RequiredDigitNotFoundAfterDecimal
static string TypeRequiresAsyncSerialization
static string InvalidComparison
static string JsonElementHasWrongType
static string NoMetadataForType
static string Format(string resourceFormat, object p1)
static string PropertyNameTooLarge
static string CannotDecodeInvalidBase64
static string CommentHandlingMustBeValid
static string IgnoreConditionOnValueTypeInvalid
static string CannotEncodeInvalidUTF8
static string SerializationConverterNotCompatible
static string ArrayDepthTooLarge
static string NodeDuplicateKey
static string MetadataReferenceCannotContainOtherProperties
static string NamingPolicyReturnNull
static string MetadataDuplicateIdFound
static string SerializerCycleDetected
static string SerializationConverterOnAttributeInvalid
static string ExpectedSeparatorAfterPropertyNameNotFound
static string InvalidHexCharacterWithinString
static string ExpectedStartOfPropertyOrValueNotFound
static string CannotWritePropertyWithinArray
static string FormatDecimal
static string DeserializeNoConstructor
static string SerializationDuplicateTypeAttribute
static string MetadataInvalidReferenceToValueType
static string ObjectWithParameterizedCtorRefMetadataNotHonored
static string SerializerPropertyNameConflict
static string CannotSerializeInvalidMember
static string OptionsAlreadyBoundToContext
static string MetadataInvalidTokenAfterValues
static string EndOfStringNotFound
static string ExpectedStartOfPropertyOrValueAfterComment
static string MetadataCannotParsePreservedObjectToImmutable
static string SerializationConverterRead
static string DeserializeUnableToAssignValue
static string CannotSerializeInvalidType
static string RequiredDigitNotFoundAfterSign
static string ExpectedOneCompleteToken
static string EndOfCommentNotFound
static string CannotWriteCommentWithEmbeddedDelimiter
static string ExpectedFalse
static string TrailingCommaNotAllowedBeforeObjectEnd
static string DeserializeWrongType
static string FormatUInt64
static string SerializationDataExtensionPropertyInvalid
static string ExtensionDataCannotBindToCtorParam
static string FormatBoolean
static string MetadataIdIsNotFirstProperty
static string SerializerPropertyNameNull
static string FormatDouble
static string CannotTranscodeInvalidUtf16
static string NoMetadataForTypeCtorParams
static string MultipleMembersBindWithConstructorParameter
static string FormatUInt16
static string NotEnoughData
static string RequiredDigitNotFoundEndOfData
static string BufferMaximumSizeExceeded
static string MetadataPreservedArrayInvalidProperty
static string ExpectedNextDigitEValueNotFound
static string SerializerContextOptionsImmutable
static string FormatSByte
static string CannotReadIncompleteUTF16
static string MaxDepthMustBePositive
static string ExpectedEndOfDigitNotFound
static string MismatchedObjectArray
static string JsonIncludeOnNonPublicInvalid
static string FormatTimeSpan
static string DictionaryKeyTypeNotSupported
static string NoMetadataForTypeProperties
static string ExpectedStartOfValueNotFound
static string ExpectedEndAfterSingleJson
static string NodeValueNotAllowed
static string ExpectedValueAfterPropertyNameNotFound
static string FoundInvalidCharacter
static string CannotWritePropertyAfterProperty
static string DeserializeUnableToAssignNull
static string FormatInt32
static string SpecialNumberValuesNotSupported
static string SerializationNotSupportedParentType
static string NodeCycleDetected
static string BuiltInConvertersNotRooted
static string ZeroDepthAtEnd
static string ConverterCanConvertMultipleTypes
static string NumberHandlingOnPropertyInvalid
static string UnexpectedEndOfLineSeparator
static string DepthTooLarge
static string SerializerConverterFactoryReturnsNull
static string MetadataReferenceOfTypeCannotBeAssignedToType
static string FormatInt64
static string CannotStartObjectArrayWithoutProperty
static string SerializerConverterFactoryReturnsJsonConverterFactory
static string SerializationConverterWrite
static string ExpectedNull
static string Utf8GetString(ReadOnlySpan< byte > bytes)
static MetadataPropertyName GetMetadataPropertyName(ReadOnlySpan< byte > propertyName)
static FormatException GetFormatException(DataType dateType)
static InvalidOperationException GetInvalidOperationException_ExpectedChar(JsonTokenType tokenType)
static void ThrowNotSupportedException_NodeCollectionIsReadOnly()
static void ThrowNotSupportedException_ConstructorMaxOf64Parameters(Type type)
static void ThrowJsonException_SerializerCycleDetected(int maxDepth)
static void ThrowArgumentException(string message)
static void ThrowInvalidOperationException_JsonIncludeOnNonPublicInvalid(string memberName, Type declaringType)
static void ThrowInvalidOperationException_SerializerOptionsImmutable(JsonSerializerContext context)
static void ThrowJsonException_MetadataValueWasNotString(JsonTokenType tokenType)
static void ThrowJsonException_MetadataValueWasNotString(JsonValueKind valueKind)
static void ThrowInvalidOperationException_NodeAlreadyHasParent()
static void ThrowArgumentException(ReadOnlySpan< char > propertyName, ReadOnlySpan< char > value)
static void ThrowInvalidOperationException_SerializationDuplicateTypeAttribute(Type classType, Type attribute)
static FormatException GetFormatException(NumericType numericType)
static InvalidOperationException GetInvalidOperationException_ReadInvalidUTF8(DecoderFallbackException innerException)
static void ThrowInvalidOperationOrArgumentException(ReadOnlySpan< byte > propertyName, int currentDepth)
static void ThrowInvalidOperationException_CannotSerializeInvalidType(Type type, Type parentClassType, MemberInfo memberInfo)
static InvalidOperationException GetJsonElementWrongTypeException(string expectedTypeName, JsonTokenType actualType)
static void ThrowJsonException_MetadataMissingIdBeforeValues(ref ReadStack state, ReadOnlySpan< byte > propertyName)
static void ThrowOutOfMemoryException(uint capacity)
static void ThrowNotSupportedException_BuiltInConvertersNotRooted(Type type)
static void ThrowInvalidOperationException(ExceptionResource resource, int currentDepth, byte token, JsonTokenType tokenType)
static void ReThrowWithPath(ref WriteStack state, Exception ex)
static void ThrowInvalidOperationOrArgumentException(ReadOnlySpan< char > propertyName, int currentDepth)
static ArgumentOutOfRangeException GetArgumentOutOfRangeException_CommentEnumMustBeInRange(string parameterName)
static void ThrowInvalidOperationException_SerializerPropertyNameNull(Type parentType, JsonPropertyInfo jsonPropertyInfo)
static void ThrowInvalidOperationException_NumberHandlingOnPropertyInvalid(JsonPropertyInfo jsonPropertyInfo)
static InvalidOperationException GetInvalidOperationException_ExpectedNumber(JsonTokenType tokenType)
static void ThrowJsonReaderException(ref Utf8JsonReader json, ExceptionResource resource, byte nextByte=0, ReadOnlySpan< byte > bytes=default(ReadOnlySpan< byte >))
static void ThrowJsonException_MetadataReferenceObjectCannotContainOtherProperties(ReadOnlySpan< byte > propertyName, ref ReadStack state)
static void ThrowMissingMemberException_MissingFSharpCoreMember(string missingFsharpCoreMember)
static void ThrowInvalidCastException_DeserializeUnableToAssignValue(Type typeOfValue, Type declaredType)
static InvalidOperationException GetInvalidOperationException_ExpectedObject(JsonTokenType tokenType)
static string GetResourceString(ExceptionResource resource, int currentDepth, byte token, JsonTokenType tokenType)
static void ThrowJsonException_SerializationConverterRead(JsonConverter converter)
static void ThrowJsonException_MetadataValuesInvalidToken(JsonTokenType tokenType)
static void ThrowNotSupportedException(ref ReadStack state, in Utf8JsonReader reader, NotSupportedException ex)
static InvalidOperationException GetInvalidOperationException(string message, Exception innerException)
static ArgumentOutOfRangeException GetArgumentOutOfRangeException(string parameterName, string message)
static void ThrowNotSupportedException_ObjectWithParameterizedCtorRefMetadataNotHonored(ReadOnlySpan< byte > propertyName, ref Utf8JsonReader reader, ref ReadStack state)
static InvalidOperationException GetJsonElementWrongTypeException(JsonValueKind expectedType, JsonValueKind actualType)
static void ThrowInvalidOperationException_MetadataReferenceOfTypeCannotBeAssignedToType(string referenceId, Type currentType, Type typeToConvert)
static FormatException GetFormatException()
static InvalidOperationException GetJsonElementWrongTypeException(JsonTokenType expectedType, JsonTokenType actualType)
static void ThrowJsonException_MetadataInvalidReferenceToValueType(Type propertyType)
static void ThrowInvalidOperationException_SerializationConverterNotCompatible(Type converterType, Type type)
static void ThrowInvalidOperationException_SerializationDataExtensionPropertyInvalid(Type type, JsonPropertyInfo jsonPropertyInfo)
static string GetResourceString(ref Utf8JsonReader json, ExceptionResource resource, byte nextByte, string characters)
static void ThrowInvalidOperationException_DeserializeUnableToAssignNull(Type declaredType)
static InvalidOperationException GetJsonElementWrongTypeException(string expectedTypeName, JsonValueKind actualType)
static void ThrowInvalidOperationException_SerializationConverterOnAttributeNotCompatible(Type classTypeAttributeIsOn, MemberInfo memberInfo, Type typeToConvert)
static void ThrowArgumentException_InvalidCommentValue()
static void ThrowJsonException_DeserializeUnableToConvertValue(Type propertyType)
static void ThrowArgumentException_NodeValueNotAllowed(string paramName)
static void ThrowInvalidOperationException(int currentDepth)
static ArgumentException GetArgumentException_ReadInvalidUTF16(EncoderFallbackException innerException)
static void ThrowArgumentException(ReadOnlySpan< char > propertyName, ReadOnlySpan< byte > value)
static void ThrowJsonException_MetadataReferenceNotFound(string id)
static void ThrowInvalidOperationException_IgnoreConditionOnValueTypeInvalid(string clrPropertyName, Type propertyDeclaringType)
static void ThrowArgumentException_NodeArrayTooSmall(string paramName)
static InvalidOperationException GetInvalidOperationException_ExpectedStringComparison(JsonTokenType tokenType)
static void ThrowJsonException_MetadataDuplicateIdFound(string id)
static InvalidOperationException GetInvalidOperationException(string message, JsonTokenType tokenType)
static void ThrowInvalidOperationException_SerializationDuplicateAttribute(Type attribute, Type classType, MemberInfo memberInfo)
static InvalidOperationException GetInvalidOperationException(string message)
static ArgumentOutOfRangeException GetArgumentOutOfRangeException_MaxDepthMustBePositive(string parameterName)
static void ThrowInvalidOperationException_SerializerConverterFactoryReturnsJsonConverterFactorty(Type converterType)
static void ThrowJsonException_MetadataReferenceObjectCannotContainOtherProperties()
static void ThrowArgumentException_InvalidUTF8(ReadOnlySpan< byte > value)
static InvalidOperationException GetInvalidOperationException_ExpectedArray(JsonTokenType tokenType)
static void ThrowNotSupportedException_DictionaryKeyTypeNotSupported(Type keyType, JsonConverter converter)
static void ThrowNotSupportedException_CannotPopulateCollection(Type type, ref Utf8JsonReader reader, ref ReadStack state)
static void ThrowInvalidOperationException_JsonSerializerOptionsAlreadyBoundToContext()
static void ThrowInvalidOperationException_SerializationDuplicateTypeAttribute< TAttribute >(Type classType)
static void ThrowInvalidOperationException_ReadInvalidUTF16()
static void ThrowInvalidOperationException_NeedLargerSpan()
static void ThrowInvalidOperationException_NodeCycleDetected()
static ArgumentException GetArgumentException(string message)
static void AddJsonExceptionInformation(ref WriteStack state, JsonException ex)
static void ThrowInvalidOperationException_NoMetadataForTypeProperties(JsonSerializerContext context, Type type)
static void ThrowInvalidOperationException_NoMetadataForType(Type type)
static void ReThrowWithPath(ref ReadStack state, in Utf8JsonReader reader, Exception ex)
static void AddJsonExceptionInformation(ref ReadStack state, in Utf8JsonReader reader, JsonException ex)
static InvalidOperationException GetInvalidOperationException_ExpectedString(JsonTokenType tokenType)
static void ThrowInvalidOperationException_ReadInvalidUTF16(int charAsInt)
static void ThrowInvalidOperationException_SerializationConverterOnAttributeInvalid(Type classType, MemberInfo memberInfo)
static void ThrowNotSupportedException_NoMetadataForType(Type type)
static void ThrowArgumentException_DeserializeWrongType(Type type, object value)
static void ThrowArgumentException_PropertyNameTooLarge(int tokenLength)
static JsonException GetJsonReaderException(ref Utf8JsonReader json, ExceptionResource resource, byte nextByte, ReadOnlySpan< byte > bytes)
static void ThrowInvalidOperationException_MultiplePropertiesBindToConstructorParameters(Type parentType, string parameterName, string firstMatchName, string secondMatchName)
static InvalidOperationException GetInvalidOperationException_ExpectedComment(JsonTokenType tokenType)
static void ThrowOutOfMemoryException_BufferMaximumSizeExceeded(uint capacity)
static NotSupportedException NotSupportedException_NodeCollectionIsReadOnly()
static void ThrowJsonException_MetadataPreservedArrayValuesNotFound(ref ReadStack state, Type propertyType)
static void ThrowInvalidOperationException_SerializerPropertyNameConflict(Type type, JsonPropertyInfo jsonPropertyInfo)
static InvalidOperationException GetInvalidOperationException_ExpectedBoolean(JsonTokenType tokenType)
static InvalidOperationException GetInvalidOperationException_CannotSkipOnPartial()
static void ReThrowWithPath(ref ReadStack state, JsonReaderException ex)
static void ThrowInvalidOperationException_NamingPolicyReturnNull(JsonNamingPolicy namingPolicy)
static void ThrowArgumentException_ValueTooLarge(int tokenLength)
static InvalidOperationException GetInvalidOperationException(JsonTokenType tokenType)
static void ThrowArgumentException(ReadOnlySpan< byte > propertyName, ReadOnlySpan< byte > value)
static void ThrowArgumentOutOfRangeException_NodeArrayIndexNegative(string paramName)
static void ThrowJsonException_MetadataInvalidPropertyWithLeadingDollarSign(ReadOnlySpan< byte > propertyName, ref ReadStack state, in Utf8JsonReader reader)
static void ThrowJsonException_MetadataPreservedArrayInvalidProperty(ref ReadStack state, Type propertyType, in Utf8JsonReader reader)
static void ThrowNotSupportedException(ref WriteStack state, NotSupportedException ex)
static string GetPrintableString(byte value)
static void ThrowJsonException_MetadataIdIsNotFirstProperty(ReadOnlySpan< byte > propertyName, ref ReadStack state)
static void ThrowJsonException(string message=null)
static InvalidOperationException GetInvalidOperationException(ExceptionResource resource, int currentDepth, byte token, JsonTokenType tokenType)
static void ThrowInvalidOperationException_NoMetadataForTypeCtorParams(JsonSerializerContext context, Type type)
static void ThrowNotSupportedException_TypeRequiresAsyncSerialization(Type propertyType)
static void ThrowJsonException_SerializationConverterWrite(JsonConverter converter)
static void ThrowArgumentException_DuplicateKey(string propertyName)
static void ThrowJsonException_MetadataCannotParsePreservedObjectIntoImmutable(Type propertyType)
static void ThrowInvalidOperationException_ConverterCanConvertMultipleTypes(Type runtimePropertyType, JsonConverter jsonConverter)
static void ThrowInvalidOperationException_SerializerConverterFactoryReturnsNull(Type converterType)
static void ThrowNotSupportedException_SerializationNotSupported(Type propertyType)
static void ThrowNotSupportedException_DeserializeNoConstructor(Type type, ref Utf8JsonReader reader, ref ReadStack state)
static void ThrowArgumentException_InvalidUTF16(int charAsInt)
static void ThrowInvalidOperationException_ConstructorParameterIncompleteBinding(Type parentType)
static bool IsPrintable(byte value)
static void ThrowInvalidOperationException_ExtensionDataCannotBindToCtorParam(JsonPropertyInfo jsonPropertyInfo)
static void ThrowArgumentException(ReadOnlySpan< byte > propertyName, ReadOnlySpan< char > value)
static void ThrowUnexpectedMetadataException(ReadOnlySpan< byte > propertyName, ref Utf8JsonReader reader, ref ReadStack state)
static void ThrowArgumentException_ValueNotSupported()
static void ThrowInvalidOperationException(string message)
void AppendLiteral(string value)
void AppendFormatted(ReadOnlySpan< char > value)