<PackageReference Include="System.Text.Json" Version="5.0.0-preview.2.20160.6" />

ThrowHelper

static class ThrowHelper
public const string ExceptionSourceValueToRethrowAsJsonException = "System.Text.Json.Rethrowable"

public static void AddExceptionInformation(ref ReadStack state, ref Utf8JsonReader reader, JsonException ex)

public static void AddExceptionInformation(ref WriteStack state, JsonException ex)

public static FormatException GetFormatException(NumericType numericType)

public static InvalidOperationException GetInvalidOperationException(string message, Exception innerException)

public static InvalidOperationException GetInvalidOperationException(ExceptionResource resource, int currentDepth, byte token, JsonTokenType tokenType)

public static JsonException GetJsonReaderException(ref Utf8JsonReader json, ExceptionResource resource, byte nextByte, ReadOnlySpan<byte> bytes)

public static void ReThrowWithPath(ref ReadStack state, JsonReaderException ex)

public static void ReThrowWithPath(ref ReadStack state, ref Utf8JsonReader reader, Exception ex)

public static void ReThrowWithPath(ref WriteStack state, Exception ex)

public static void ThrowArgumentException(string message)

public static void ThrowArgumentException(ReadOnlySpan<byte> propertyName, ReadOnlySpan<byte> value)

public static void ThrowArgumentException(ReadOnlySpan<byte> propertyName, ReadOnlySpan<char> value)

public static void ThrowArgumentException(ReadOnlySpan<char> propertyName, ReadOnlySpan<byte> value)

public static void ThrowArgumentException(ReadOnlySpan<char> propertyName, ReadOnlySpan<char> value)

public static void ThrowArgumentException_DeserializeWrongType(Type type, object value)

public static void ThrowArgumentException_InvalidUTF16(int charAsInt)

public static void ThrowArgumentException_InvalidUTF8(ReadOnlySpan<byte> value)

public static void ThrowArgumentException_PropertyNameTooLarge(int tokenLength)

public static void ThrowArgumentException_ValueTooLarge(int tokenLength)

public static void ThrowInvalidOperationException(int currentDepth)

public static void ThrowInvalidOperationException(string message)

public static void ThrowInvalidOperationException(ExceptionResource resource, int currentDepth, byte token, JsonTokenType tokenType)

public static void ThrowInvalidOperationException_DepthNonZeroOrEmptyJson(int currentDepth)

public static void ThrowInvalidOperationException_ReadInvalidUTF16(int charAsInt)

public static void ThrowInvalidOperationException_SerializationConverterOnAttributeNotCompatible(Type classTypeAttributeIsOn, PropertyInfo propertyInfo, Type typeToConvert)

public static void ThrowInvalidOperationException_SerializationDuplicateAttribute(Type attribute, Type classType, PropertyInfo propertyInfo)

public static void ThrowInvalidOperationException_SerializerPropertyNameNull(Type parentType, JsonPropertyInfo jsonPropertyInfo)

public static void ThrowInvalidOperationOrArgumentException(ReadOnlySpan<byte> propertyName, int currentDepth)

public static void ThrowInvalidOperationOrArgumentException(ReadOnlySpan<char> propertyName, int currentDepth)

public static void ThrowJsonException(string message = null)

public static void ThrowJsonException_MetadataDuplicateIdFound(string id, ref ReadStack state)

public static void ThrowJsonException_MetadataIdIsNotFirstProperty(ReadOnlySpan<byte> propertyName, ref ReadStack state)

public static void ThrowJsonException_MetadataInvalidPropertyWithLeadingDollarSign(ReadOnlySpan<byte> propertyName, ref ReadStack state, ref Utf8JsonReader reader)

public static void ThrowJsonException_MetadataReferenceNotFound(string id)

public static void ThrowJsonReaderException(ref Utf8JsonReader json, ExceptionResource resource, byte nextByte = 0, ReadOnlySpan<byte> bytes = default)

public static NotSupportedException ThrowNotSupportedException_SerializationNotSupported(Type propertyType, Type parentType = null, MemberInfo memberInfo = null)