Enum serde_json::error::ErrorCode
source · pub(crate) enum ErrorCode {
Show 25 variants
Message(Box<str>),
Io(Error),
EofWhileParsingList,
EofWhileParsingObject,
EofWhileParsingString,
EofWhileParsingValue,
ExpectedColon,
ExpectedListCommaOrEnd,
ExpectedObjectCommaOrEnd,
ExpectedSomeIdent,
ExpectedSomeValue,
ExpectedDoubleQuote,
InvalidEscape,
InvalidNumber,
NumberOutOfRange,
InvalidUnicodeCodePoint,
ControlCharacterWhileParsingString,
KeyMustBeAString,
ExpectedNumericKey,
FloatKeyMustBeFinite,
LoneLeadingSurrogateInHexEscape,
TrailingComma,
TrailingCharacters,
UnexpectedEndOfHexEscape,
RecursionLimitExceeded,
}
Variants§
Message(Box<str>)
Catchall for syntax error messages
Io(Error)
Some I/O error occurred while serializing or deserializing.
EofWhileParsingList
EOF while parsing a list.
EofWhileParsingObject
EOF while parsing an object.
EofWhileParsingString
EOF while parsing a string.
EofWhileParsingValue
EOF while parsing a JSON value.
ExpectedColon
Expected this character to be a ':'
.
ExpectedListCommaOrEnd
Expected this character to be either a ','
or a ']'
.
ExpectedObjectCommaOrEnd
Expected this character to be either a ','
or a '}'
.
ExpectedSomeIdent
Expected to parse either a true
, false
, or a null
.
ExpectedSomeValue
Expected this character to start a JSON value.
ExpectedDoubleQuote
Expected this character to be a "
.
InvalidEscape
Invalid hex escape code.
InvalidNumber
Invalid number.
NumberOutOfRange
Number is bigger than the maximum value of its type.
InvalidUnicodeCodePoint
Invalid unicode code point.
ControlCharacterWhileParsingString
Control character found while parsing a string.
KeyMustBeAString
Object key is not a string.
ExpectedNumericKey
Contents of key were supposed to be a number.
FloatKeyMustBeFinite
Object key is a non-finite float value.
LoneLeadingSurrogateInHexEscape
Lone leading surrogate in hex escape.
TrailingComma
JSON has a comma after the last value in an array or map.
TrailingCharacters
JSON has non-whitespace trailing characters after the value.
UnexpectedEndOfHexEscape
Unexpected end of hex escape.
RecursionLimitExceeded
Encountered nesting of JSON maps and arrays more than 128 layers deep.