Error
The parsing errors are divided into two categories:
SyntaxErroris for clearly malformed JSON documents, such as giving an input document that isn't JSON at all.UnexpectedEndOfInputis for signaling that everything's been valid so far, but the input appears to be truncated for some reason. Note that a completely empty (or whitespace-only) input will giveUnexpectedEndOfInput.
Source
Implementation
pub const Error = error{ SyntaxError, UnexpectedEndOfInput }