CrystalJson.Errors
Namespace: SnowBank.Data.Json · class
Methods
Parsing_CannotCastFieldToJsonArray
static JsonBindingException Parsing_CannotCastFieldToJsonArray(JsonValue value, string fieldName)
Parsing_CannotCastFieldToJsonObject
static JsonBindingException Parsing_CannotCastFieldToJsonObject(JsonValue value, string fieldName)
Parsing_CannotCastToJsonArray
static JsonBindingException Parsing_CannotCastToJsonArray(JsonValue value)
Parsing_CannotCastToJsonBoolean
static JsonBindingException Parsing_CannotCastToJsonBoolean(JsonValue value)
Parsing_CannotCastToJsonNumber
static JsonBindingException Parsing_CannotCastToJsonNumber(JsonValue value)
Parsing_CannotCastToJsonObject
static JsonBindingException Parsing_CannotCastToJsonObject(JsonValue value)
Parsing_CannotCastToJsonString
static JsonBindingException Parsing_CannotCastToJsonString(JsonValue value)
Parsing_ChildIsNullOrMissing
static JsonBindingException Parsing_ChildIsNullOrMissing(JsonValue parent, JsonPathSegment segment, string message)
static JsonBindingException Parsing_ChildIsNullOrMissing(IJsonProxyNode node, in JsonPathSegment child, string message)
Parsing_DescendantIsNullOrMissing
static JsonBindingException Parsing_DescendantIsNullOrMissing(IJsonProxyNode node, JsonPath path, string message)
Parsing_FieldIsNullOrMissing
static JsonBindingException Parsing_FieldIsNullOrMissing(JsonValue parent, string field, string message)
static JsonBindingException Parsing_FieldIsNullOrMissing(JsonValue parent, ReadOnlyMemory<char> field, string message)
Parsing_ItemIsNullOrMissing
static JsonBindingException Parsing_ItemIsNullOrMissing(JsonValue parent, Index index, string message)
Parsing_ValueIsNullOrMissing
static JsonBindingException Parsing_ValueIsNullOrMissing()
Serialization_CouldNotGetDefaultValueForMember
static JsonSerializationException Serialization_CouldNotGetDefaultValueForMember(Type type, MemberInfo info, Exception error)
Serialization_CouldNotResolveTypeDefinition
static JsonSerializationException Serialization_CouldNotResolveTypeDefinition(Type type)
Serialization_DoesNotKnowHowToSerializeNullableType
static JsonSerializationException Serialization_DoesNotKnowHowToSerializeNullableType(Type type)
Serialization_DoesNotKnowHowToSerializeType
static JsonSerializationException Serialization_DoesNotKnowHowToSerializeType(Type type)
Serialization_FailTooDeep
static JsonSerializationException Serialization_FailTooDeep(int depth, object current)
static JsonSerializationException Serialization_FailTooDeep(int depth, Type current)
Same message as Serialization_FailTooDeep, for callers that only have the static Type of the offending value (typically a value type, to avoid boxing it just to name it)
Serialization_InstanceJsonPackMethodInvalidSignature
static JsonSerializationException Serialization_InstanceJsonPackMethodInvalidSignature(Type type, MethodInfo method)
Serialization_InternalDepthInconsistent
static JsonSerializationException Serialization_InternalDepthInconsistent()
Serialization_LeaveNotSameThanMark
static JsonSerializationException Serialization_LeaveNotSameThanMark(int depth, object current)
Serialization_ObjectRecursionIsNotAllowed
static JsonSerializationException Serialization_ObjectRecursionIsNotAllowed(IEnumerable<object> visited, object value, int depth)
Serialization_StaticJsonSerializeMethodInvalidFirstParam
static JsonSerializationException Serialization_StaticJsonSerializeMethodInvalidFirstParam(Type type, MethodInfo method, Type prmType)
Serialization_StaticJsonSerializeMethodInvalidSecondParam
static JsonSerializationException Serialization_StaticJsonSerializeMethodInvalidSecondParam(Type type, MethodInfo method, Type prmType)
Serialization_StaticJsonSerializeMethodInvalidSignature
static JsonSerializationException Serialization_StaticJsonSerializeMethodInvalidSignature(Type type, MethodInfo method)
Fields
BooleanLiteralTypeNotSupported
const string BooleanLiteralTypeNotSupported
Message used when a [JsonBooleanLiterals] argument has a type with no JSON representation
Format placeholders: {0} the parameter name, {1} the offending type. The source generator reports the same text at compile time, and a test pins the two copies equal: moving these arguments to object moved type checking off the compiler and onto us, so the two checks have to say the same thing.
CallbackSignatureNotSupported
const string CallbackSignatureNotSupported
Message used when a serialization callback has any other signature this serializer cannot invoke
Format placeholder {0} is the offending method's name. Duplicated in the source generator, and pinned equal by a test, for the same reason as .
CallbackStreamingContextNotSupported
const string CallbackStreamingContextNotSupported
Message used when a serialization callback declares the legacy StreamingContext parameter
Format placeholder {0} is the offending callback's declaring type and method name (e.g. Acme.Orders.Order.OnDeserializing): the reflection path rejects the callback at run time with no source location, so the type has to be in the text.
The source generator reports the same text as a build error. The two copies live in different assemblies (an analyzer cannot reference this one), so a test asserts they are identical rather than trusting them to stay in sync.