JSON parser error messages
Every parser words the same mistake differently. This registry maps 379 distinct error messages, captured by running 50 malformed documents through 21 parsers, back to the 50 underlying causes — with the fix for each. Nothing here is transcribed from documentation: every message was produced by executing the parser.
Search the exact message
Syntax
/* */ comments are not valid JSON
Block comments, like line comments, have no place in the JSON grammar.…
// comments are not valid JSON
JSON has no comment syntax. Comments are ubiquitous in config files, and several tools (VS Code settings, tsconfig) accept them via the JSONC dialect,…
Colon inside a JSON array
Object syntax used inside array brackets — the brackets should be braces, or the colon should be a comma.…
Comma in an empty JSON object
A comma with no members around it, usually left after deleting the last entry of an object.…
Double comma in a JSON array
Two commas in a row, leaving an empty slot. JavaScript allows array holes; JSON does not.…
JavaScript object literal passed off as JSON
Unquoted keys, single-quoted strings and trailing commas together — valid JavaScript source, not a JSON document.…
Missing colon after an object key
A key followed directly by its value with no colon separating them.…
Missing comma between array elements
Two values in an array with only whitespace between them.…
Missing comma between object members
Two key/value pairs with no separator. Common after copy-pasting a block of members or deleting a member and taking its neighbour's comma with it.…
Numeric object key in JSON
A key written as a bare number. JSON object keys are always strings, even when they look like integers.…
Python dict repr passed off as JSON
The output of `str(dict)` or `print(dict)` rather than `json.dumps(dict)`. It combines single quotes with, potentially, `True`/`False`/`None` — severa…
Single-quoted strings in JSON
JSON only recognises double quotes. Single quotes are valid in JavaScript, Python and YAML, so pasted snippets from those languages fail immediately.…
Trailing comma in a JSON array
A comma after the last element of an array. Usually produced by a loop that appends `item + ','` without special-casing the final iteration.…
Trailing comma in a JSON object
A comma after the last member of an object. JavaScript, Python and most modern languages allow this in their own literal syntax, so it is very easy to…
Unquoted object key in JSON
Object keys must be double-quoted strings. A bare identifier is legal in a JavaScript object literal but not in JSON.…
Unquoted string value in JSON
A value that is neither a number, `true`, `false`, `null`, an object nor an array must be a quoted string.…
Invalid literal
Infinity is not valid JSON
Same root cause as NaN — a float overflowed and the serialiser wrote `Infinity` or `-Infinity`, which the JSON grammar has no token for.…
NaN is not valid JSON
`NaN` has no representation in JSON. It appears when a language serialises a floating-point not-a-number without checking — Python's `json.dumps` emit…
Python True / False / None in JSON
Python's `repr` of a dict writes `True`, `False` and `None`. JSON requires the lowercase `true`, `false` and `null`.…
undefined is not valid JSON
`undefined` is a JavaScript value with no JSON equivalent. `JSON.stringify` normally drops undefined object properties, so seeing it in a document mea…
String content
Invalid escape sequence in a JSON string
A backslash followed by a character JSON does not define. The complete set is `\" \\ \/ \b \f \n \r \t` and `\uXXXX`. Windows paths are the usual culp…
Literal newline inside a JSON string
A real line break between the quotes. JSON forbids unescaped control characters (U+0000 to U+001F) inside strings, and a newline is one of them.…
Literal tab inside a JSON string
A raw tab character inside string content. Like a newline, it is a control character and must be escaped.…
Lone surrogate in a JSON string
A high surrogate (`\uD800`–`\uDBFF`) with no following low surrogate. Characters outside the Basic Multilingual Plane — emoji, most notably — are enco…
Malformed \u escape in a JSON string
A `\u` not followed by exactly four hexadecimal digits.…
Raw NUL byte inside a JSON string
A U+0000 byte in string content, usually from a C string boundary, a fixed-width database column, or binary data that was treated as text.…
Truncated \u escape in a JSON string
A `\u` escape with fewer than four hex digits, typically where a string was cut mid-escape by a length limit.…
Number format
Bare minus sign where a number was expected
A minus with no digits after it. Typically a templated value that resolved to empty, leaving the sign behind.…
Hexadecimal number in JSON
JSON numbers are decimal only. `0x1F` comes from a language literal or from a value that should have stayed a string, such as a colour code or a memor…
Leading decimal point in a JSON number
`.5` is valid in several languages but JSON requires a digit before the decimal point.…
Leading plus sign in a JSON number
JSON allows a leading minus but not a leading plus. Explicitly signed values from spreadsheets or telemetry formats trip this.…
Leading zero in a JSON number
JSON's number grammar forbids a leading zero on a multi-digit integer, to avoid any suggestion of octal. Zip codes, phone numbers and zero-padded IDs …
Trailing decimal point in a JSON number
`1.` is valid in C and JavaScript but not in JSON, which requires at least one digit after the decimal point.…
Truncated document
Unclosed array — unexpected end of JSON input
The array's closing bracket is missing, usually for the same transport or buffer reason as an unclosed object.…
Unclosed object — unexpected end of JSON input
The document ends before its closing brace. Caused by truncated downloads, a response cut off by a timeout, a log line that hit a size limit, or a fil…
Unterminated string in JSON
A string opens but never closes, so the parser consumes the rest of the document looking for the closing quote. A double quote inside string content t…
Wrong input entirely
Bare unquoted word as a JSON document
A single token with no quotes. Either a plain-text response being parsed as JSON, or a string value that was never quoted.…
Empty string passed to a JSON parser
The document is zero bytes. Almost always an upstream failure: an HTTP call that returned 204, a file that was never written, a variable that was neve…
Extra data after a JSON document
Two complete documents concatenated. Usually a file appended to rather than overwritten, or several API responses written to the same buffer.…
HTML received where JSON was expected
The response body is an HTML page, not JSON. The server returned an error page, a login redirect, a proxy or captive-portal interstitial, or a rate-li…
NDJSON fed to a whole-document JSON parser
Newline-delimited JSON: one complete document per line. Each line is valid on its own, but the file as a whole is not a single JSON text. Log pipeline…
The literal string 'undefined' as a JSON document
A JavaScript variable holding `undefined` was interpolated into a string and sent as the body. `String(undefined)` is `"undefined"`.…
Trailing characters after a JSON document
Non-whitespace content after the closing brace — a stray word, a shell prompt captured with the output, or a log line appended to the payload.…
Whitespace-only input
The document contains only spaces, tabs or newlines. Same family as empty input — a file was created but never filled.…
Whole JSON document wrapped in quotes
The document is double-encoded — a JSON string containing JSON, or a shell variable that kept its surrounding quotes.…
Encoding
Curly (smart) quotes in JSON
Typographic quotes U+201C and U+201D instead of the ASCII double quote. Produced by word processors, chat clients, Google Docs and any editor with aut…
UTF-8 BOM before a JSON document
A byte order mark (EF BB BF) at the start of the file. Windows editors, Excel exports and PowerShell's `Out-File` add one by default. RFC 8259 says a …
Parses but wrong
Duplicate keys in a JSON object
The same key appears twice. The JSON specification does not forbid this, and it does not define which value wins — so every parser in this registry ac…
Integer too large for a JSON parser's number type
JSON's grammar permits arbitrary-precision numbers, but most parsers map them onto an IEEE 754 double, which holds integers exactly only up to 2^53−1.…
Parser limits
Deeply nested JSON exceeding a parser's depth limit
Recursive-descent parsers use the call stack for nesting, so past a few hundred levels they either raise a depth error or overflow the stack. Some par…
All 379 messages, grouped by parser
CPython json.loads CPython 3.12.3
Expecting ',' delimiter: line L column C (char N)Expecting ':' delimiter: line L column C (char N)Expecting property name enclosed in double quotes: line L column C (char N)Expecting value: line L column C (char N)Extra data: line L column C (char N)Invalid \escape: line L column C (char N)Invalid \uXXXX escape: line L column C (char N)Invalid control character at: line L column C (char N)Unexpected UTF-8 BOM (decode using utf-8-sig): line L column C (char N)Unterminated string starting at: line L column C (char N)
Gson Java 21.0.12
Expected ':' at line L column C path $…Expected name at line L column C path $…Invalid escape sequence at line L column C path $…Unterminated array at line L column C path $…Unterminated object at line L column C path $…Unterminated string at line L column C path $…Use JsonReader.setLenient(true) to accept malformed JSON at line L column C path $…java.io.EOFException: End of input at line L column C path $…
Gson JsonParser (lenient off) Java 21.0.12
JSON5 Node.js 22.22.2
JSON5: invalid character ',' at 1:2JSON5: invalid character ',' at 1:4JSON5: invalid character '1' at 1:2JSON5: invalid character '1' at 1:6JSON5: invalid character '1' at 1:8JSON5: invalid character '2' at 1:4JSON5: invalid character ':' at 1:3JSON5: invalid character '<' at 1:1JSON5: invalid character 'T' at 1:7JSON5: invalid character 'Z' at 1:10JSON5: invalid character '\"' at 1:12JSON5: invalid character '\"' at 1:9JSON5: invalid character '\n' at 2:0JSON5: invalid character 'g' at 1:10JSON5: invalid character 'h' at 1:1JSON5: invalid character 'h' at 1:7JSON5: invalid character 'u' at 1:1JSON5: invalid character 'u' at 1:7JSON5: invalid character '{' at 1:9JSON5: invalid character '{' at 2:1JSON5: invalid character '}' at 1:8JSON5: invalid character '“' at 1:2JSON5: invalid end of input at 1:1JSON5: invalid end of input at 1:14JSON5: invalid end of input at 1:6JSON5: invalid end of input at 1:8JSON5: invalid end of input at 2:3
JSON::PP Perl 5.038002
':' expected, at character offset N (before "…"), or ] expected while parsing array, at character offset N (before "…"), or } expected while parsing object/hash, at character offset N (before "…")garbage after JSON object, at character offset N (before "…")illegal backslash escape sequence in string, at character offset N (before "…")invalid character 0x0 encountered while parsing JSON string, at character offset N (before "…")invalid character 0x9 encountered while parsing JSON string, at character offset N (before "…")invalid character 0xA encountered while parsing JSON string, at character offset N (before "…")json text or perl structure exceeds maximum nesting level (max_depth set too low?), at character offset N (before "…")malformed JSON string, neither array, object, number, string or atom, at character offset N (before "…")malformed number (leading zero must not be followed by another digit), at character offset N (before "…")malformed number (no digits after decimal point), at character offset N (before "…")malformed number (no digits after initial minus), at character offset N (before "…")missing low surrogate character in surrogate pair, at character offset N (before "…")unexpected end of string while parsing JSON string, at character offset N (before "…")
Jackson ObjectMapper Java 21.0.12
Illegal unquoted character ((CTRL-CHAR, code 0)): has to be escaped using backslash to be included in string valueIllegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backslash to be included in string valueIllegal unquoted character ((CTRL-CHAR, code 9)): has to be escaped using backslash to be included in string valueInvalid numeric value: Leading zeroes not allowedNon-standard token 'Infinity': enable `JsonReadFeature.ALLOW_NON_NUMERIC_NUMBERS` to allowNon-standard token 'NaN': enable `JsonReadFeature.ALLOW_NON_NUMERIC_NUMBERS` to allowUnexpected character ('"' (code 34)): expected a hex-digit for character escape sequenceUnexpected character ('"' (code 34)): was expecting comma to separate Object entriesUnexpected character (''' (code 39)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')Unexpected character (''' (code 39)): was expecting double-quote to start field nameUnexpected character ('+' (code 43)) in numeric value: JSON spec does not allow numbers to have plus signs: enable `JsonReadFeature.ALLOW_LEADING_PLUS_SIGN_FOR_NUMBERS` to allowUnexpected character (',' (code 44)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')Unexpected character (',' (code 44)): was expecting double-quote to start field nameUnexpected character ('.' (code 46)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')Unexpected character ('/' (code 47)): maybe a (non-standard) comment? (not recognized as one since Feature 'ALLOW_COMMENTS' not enabled for parser)Unexpected character ('1' (code 49)): was expecting a colon to separate field name and valueUnexpected character ('1' (code 49)): was expecting double-quote to start field nameUnexpected character ('2' (code 50)): was expecting comma to separate Array entriesUnexpected character (':' (code 58)): was expecting comma to separate Array entriesUnexpected character ('<' (code 60)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')Unexpected character ('?' (code 65279 / 0xfeff)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')Unexpected character ('?' (code 8220 / 0x201c)): was expecting double-quote to start field nameUnexpected character ('Z' (code 90)): expected a hex-digit for character escape sequenceUnexpected character (']' (code 93)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')Unexpected character ('a' (code 97)): was expecting double-quote to start field nameUnexpected character ('x' (code 120)): was expecting comma to separate Object entriesUnexpected character ('}' (code 125)) in numeric value: Decimal point not followed by a digitUnexpected character ('}' (code 125)) in numeric value: expected digit (0-9) to follow minus sign, for valid numeric valueUnexpected character ('}' (code 125)): was expecting double-quote to start field nameUnexpected end-of-input: expected close marker for Array (start markerUnexpected end-of-input: expected close marker for Object (start markerUnexpected end-of-input: was expecting closing quote for a string valueUnrecognized character escape 'x' (code 120)Unrecognized token 'True': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')Unrecognized token 'hello': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')Unrecognized token 'undefined': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
JavaScriptCore JSON.parse JavaScriptCore (Bun 1.4.1)
JSON Parse error: "\u12"}" is not a valid unicode escapeJSON Parse error: "\uZZZZ" is not a valid unicode escapeJSON Parse error: Expected ':' before value in object property definitionJSON Parse error: Expected ']'JSON Parse error: Expected '}'JSON Parse error: Invalid digits after decimal pointJSON Parse error: Invalid escape character xJSON Parse error: Invalid numberJSON Parse error: Property name must be a string literalJSON Parse error: Single quotes (') are not allowed in JSONJSON Parse error: Unable to parse JSON stringJSON Parse error: Unexpected EOFJSON Parse error: Unexpected comma at the end of array expressionJSON Parse error: Unexpected identifier "Infinity"JSON Parse error: Unexpected identifier "NaN"JSON Parse error: Unexpected identifier "True"JSON Parse error: Unexpected identifier "hello"JSON Parse error: Unexpected identifier "undefined"JSON Parse error: Unexpected token ','JSON Parse error: Unexpected token '.'JSON Parse error: Unrecognized token '+'JSON Parse error: Unrecognized token '/'JSON Parse error: Unrecognized token '<'JSON Parse error: Unrecognized token '“'JSON Parse error: Unrecognized token ''JSON Parse error: Unterminated string
Newtonsoft.Json JsonConvert Newtonsoft.Json 13.0.3 on .NET 8.0.30
Additional text encountered after finished reading JSON content: g. Path '', line L, position N.Additional text encountered after finished reading JSON content: {. Path '', line L, position N.After parsing a value an unexpected character was encountered: ". Path 'a', line L, position N.After parsing a value an unexpected character was encountered: 2. Path '[0]', line L, position N.Bad JSON escape sequence: \x. Path 'a', line L, position N.Input string '-' is not a valid number. Path 'a', line L, position N.Invalid Unicode escape sequence: \uZZZZ. Path 'a', line L, position N.Invalid character after parsing property name. Expected ':' but got: 1. Path '', line L, position N.Invalid property identifier character: ,. Path '', line L, position N.Invalid property identifier character: “. Path '', line L, position N.The reader's MaxDepth of 64 has been exceeded. Path '[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0]', line L, position N.Unexpected character encountered while parsing number: :. Path '', line L, position N.Unexpected character encountered while parsing value: +. Path 'a', line L, position N.Unexpected character encountered while parsing value: <. Path '', line L, position N.Unexpected character encountered while parsing value: T. Path 'a', line L, position N.Unexpected character encountered while parsing value: h. Path '', line L, position N.Unexpected character encountered while parsing value: h. Path 'a', line L, position N.Unexpected character encountered while parsing value: . Path '', line L, position N.Unexpected end when deserializing object. Path 'a', line L, position N.Unexpected end while parsing Unicode escape sequence. Path 'a', line L, position N.Unterminated string. Expected delimiter: ". Path 'a', line L, position N.
Ruby JSON.parse Ruby 3.2.3
SpiderMonkey JSON.parse SpiderMonkey 115
JSON.parse: bad Unicode escape at line L column C of the JSON dataJSON.parse: bad control character in string literal at line L column C of the JSON dataJSON.parse: bad escaped character at line L column C of the JSON dataJSON.parse: end of data after property value in object at line L column C of the JSON dataJSON.parse: end of data when ',' or ']' was expected at line L column C of the JSON dataJSON.parse: expected ',' or ']' after array element at line L column C of the JSON dataJSON.parse: expected ',' or '}' after property value in object at line L column C of the JSON dataJSON.parse: expected ':' after property name in object at line L column C of the JSON dataJSON.parse: expected double-quoted property name at line L column C of the JSON dataJSON.parse: expected property name or '}' at line L column C of the JSON dataJSON.parse: unexpected character at line L column C of the JSON dataJSON.parse: unexpected end of data at line L column C of the JSON dataJSON.parse: unexpected non-digit at line L column C of the JSON dataJSON.parse: unexpected non-whitespace character after JSON data at line L column C of the JSON dataJSON.parse: unterminated fractional number at line L column C of the JSON dataJSON.parse: unterminated string at line L column C of the JSON data
System.Text.Json Deserialize .NET 8.0.30
'"' is invalid after a value. Expected either ',', '}', or ']'. Path: $ | LineNumber: L | BytePositionInLine: C.'"' is not a hex digit following '\u' within a JSON string. The string should be correctly escaped. Path: $ | LineNumber: L | BytePositionInLine: C.''' is an invalid start of a property name. Expected a '"'. Path: $ | LineNumber: L | BytePositionInLine: C.''' is an invalid start of a value. Path: $ | LineNumber: L | BytePositionInLine: C.'+' is an invalid start of a value. Path: $ | LineNumber: L | BytePositionInLine: C.',' is an invalid start of a property name. Expected a '"'. Path: $ | LineNumber: L | BytePositionInLine: C.',' is an invalid start of a value. Path: $ | LineNumber: L | BytePositionInLine: C.'.' is an invalid start of a value. Path: $ | LineNumber: L | BytePositionInLine: C.'/' is invalid after a value. Expected either ',', '}', or ']'. Path: $ | LineNumber: L | BytePositionInLine: C.'0x00' is invalid within a JSON string. The string should be correctly escaped. Path: $ | LineNumber: L | BytePositionInLine: C.'0x09' is invalid within a JSON string. The string should be correctly escaped. Path: $ | LineNumber: L | BytePositionInLine: C.'0x0A' is invalid within a JSON string. The string should be correctly escaped. Path: $ | LineNumber: L | BytePositionInLine: C.'0xE2' is an invalid start of a property name. Expected a '"'. Path: $ | LineNumber: L | BytePositionInLine: C.'0xEF' is an invalid start of a value. Path: $ | LineNumber: L | BytePositionInLine: C.'1' is an invalid end of a number. Expected a delimiter. Path: $ | LineNumber: L | BytePositionInLine: C.'1' is an invalid start of a property name. Expected a '"'. Path: $ | LineNumber: L | BytePositionInLine: C.'1' is invalid after a property name. Expected a ':'. Path: $ | LineNumber: L | BytePositionInLine: C.'2' is an invalid end of a number. Expected a delimiter. Path: $ | LineNumber: L | BytePositionInLine: C.'2' is invalid after a value. Expected either ',', '}', or ']'. Path: $ | LineNumber: L | BytePositionInLine: C.':' is an invalid end of a number. Expected a delimiter. Path: $ | LineNumber: L | BytePositionInLine: C.'<' is an invalid start of a value. Path: $ | LineNumber: L | BytePositionInLine: C.'I' is an invalid start of a value. Path: $ | LineNumber: L | BytePositionInLine: C.'N' is an invalid start of a value. Path: $ | LineNumber: L | BytePositionInLine: C.'T' is an invalid start of a value. Path: $ | LineNumber: L | BytePositionInLine: C.'Z' is not a hex digit following '\u' within a JSON string. The string should be correctly escaped. Path: $ | LineNumber: L | BytePositionInLine: C.'a' is an invalid start of a property name. Expected a '"'. Path: $ | LineNumber: L | BytePositionInLine: C.'g' is invalid after a single JSON value. Expected end of data. Path: $ | LineNumber: L | BytePositionInLine: C.'h' is an invalid start of a value. Path: $ | LineNumber: L | BytePositionInLine: C.'u' is an invalid start of a value. Path: $ | LineNumber: L | BytePositionInLine: C.'x' is an invalid end of a number. Expected a delimiter. Path: $ | LineNumber: L | BytePositionInLine: C.'x' is an invalid escapable character within a JSON string. The string should be correctly escaped. Path: $ | LineNumber: L | BytePositionInLine: C.'{' is invalid after a single JSON value. Expected end of data. Path: $ | LineNumber: L | BytePositionInLine: C.'}' is invalid within a number, immediately after a decimal point ('.'). Expected a digit ('0'-'9'). Path: $ | LineNumber: L | BytePositionInLine: C.'}' is invalid within a number, immediately after a sign character ('+' or '-'). Expected a digit ('0'-'9'). Path: $ | LineNumber: L | BytePositionInLine: C.Expected end of string, but instead reached end of data. Path: $ | LineNumber: L | BytePositionInLine: C.Invalid leading zero before '1'. Path: $ | LineNumber: L | BytePositionInLine: C.The JSON array contains a trailing comma at the end which is not supported in this mode. Change the reader options. Path: $ | LineNumber: L | BytePositionInLine: C.The JSON object contains a trailing comma at the end which is not supported in this mode. Change the reader options. Path: $ | LineNumber: L | BytePositionInLine: C.The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: L | BytePositionInLine: C.The maximum configured depth of 64 has been exceeded. Cannot read next JSON array. Path: $ | LineNumber: L | BytePositionInLine: C.
System.Text.Json JsonDocument .NET 8.0.30
'"' is invalid after a value. Expected either ',', '}', or ']'. LineNumber: L | BytePositionInLine: C.'"' is not a hex digit following '\u' within a JSON string. The string should be correctly escaped. LineNumber: L | BytePositionInLine: C.''' is an invalid start of a property name. Expected a '"'. LineNumber: L | BytePositionInLine: C.''' is an invalid start of a value. LineNumber: L | BytePositionInLine: C.'+' is an invalid start of a value. LineNumber: L | BytePositionInLine: C.',' is an invalid start of a property name. Expected a '"'. LineNumber: L | BytePositionInLine: C.',' is an invalid start of a value. LineNumber: L | BytePositionInLine: C.'.' is an invalid start of a value. LineNumber: L | BytePositionInLine: C.'/' is invalid after a value. Expected either ',', '}', or ']'. LineNumber: L | BytePositionInLine: C.'0x00' is invalid within a JSON string. The string should be correctly escaped. LineNumber: L | BytePositionInLine: C.'0x09' is invalid within a JSON string. The string should be correctly escaped. LineNumber: L | BytePositionInLine: C.'0x0A' is invalid within a JSON string. The string should be correctly escaped. LineNumber: L | BytePositionInLine: C.'0xE2' is an invalid start of a property name. Expected a '"'. LineNumber: L | BytePositionInLine: C.'0xEF' is an invalid start of a value. LineNumber: L | BytePositionInLine: C.'1' is an invalid end of a number. Expected a delimiter. LineNumber: L | BytePositionInLine: C.'1' is an invalid start of a property name. Expected a '"'. LineNumber: L | BytePositionInLine: C.'1' is invalid after a property name. Expected a ':'. LineNumber: L | BytePositionInLine: C.'2' is an invalid end of a number. Expected a delimiter. LineNumber: L | BytePositionInLine: C.'2' is invalid after a value. Expected either ',', '}', or ']'. LineNumber: L | BytePositionInLine: C.':' is an invalid end of a number. Expected a delimiter. LineNumber: L | BytePositionInLine: C.'<' is an invalid start of a value. LineNumber: L | BytePositionInLine: C.'I' is an invalid start of a value. LineNumber: L | BytePositionInLine: C.'N' is an invalid start of a value. LineNumber: L | BytePositionInLine: C.'T' is an invalid start of a value. LineNumber: L | BytePositionInLine: C.'Z' is not a hex digit following '\u' within a JSON string. The string should be correctly escaped. LineNumber: L | BytePositionInLine: C.'a' is an invalid start of a property name. Expected a '"'. LineNumber: L | BytePositionInLine: C.'g' is invalid after a single JSON value. Expected end of data. LineNumber: L | BytePositionInLine: C.'h' is an invalid start of a value. LineNumber: L | BytePositionInLine: C.'u' is an invalid start of a value. LineNumber: L | BytePositionInLine: C.'x' is an invalid end of a number. Expected a delimiter. LineNumber: L | BytePositionInLine: C.'x' is an invalid escapable character within a JSON string. The string should be correctly escaped. LineNumber: L | BytePositionInLine: C.'{' is invalid after a single JSON value. Expected end of data. LineNumber: L | BytePositionInLine: C.'}' is invalid within a number, immediately after a decimal point ('.'). Expected a digit ('0'-'9'). LineNumber: L | BytePositionInLine: C.'}' is invalid within a number, immediately after a sign character ('+' or '-'). Expected a digit ('0'-'9'). LineNumber: L | BytePositionInLine: C.Expected end of string, but instead reached end of data. LineNumber: L | BytePositionInLine: C.Invalid leading zero before '1'. LineNumber: L | BytePositionInLine: C.The JSON array contains a trailing comma at the end which is not supported in this mode. Change the reader options. LineNumber: L | BytePositionInLine: C.The JSON object contains a trailing comma at the end which is not supported in this mode. Change the reader options. LineNumber: L | BytePositionInLine: C.The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. LineNumber: L | BytePositionInLine: C.The maximum configured depth of 64 has been exceeded. Cannot read next JSON array. LineNumber: L | BytePositionInLine: C.
V8 JSON.parse Node.js 22.22.2
"undefined" is not valid JSONBad Unicode escape in JSON at position N (line L column C)Bad control character in string literal in JSON at position N (line L column C)Bad escaped character in JSON at position N (line L column C)Expected ',' or ']' after array element in JSON at position N (line L column C)Expected ',' or '}' after property value in JSON at position N (line L column C)Expected ':' after property name in JSON at position N (line L column C)Expected double-quoted property name in JSON at position N (line L column C)Expected property name or '}' in JSON at position N (line L column C)No number after minus sign in JSON at position N (line L column C)Unexpected end of JSON inputUnexpected non-whitespace character after JSON at position N (line L column C)Unexpected number in JSON at position N (line L column C)Unexpected token ''', "'{"a": 1}'" is not valid JSONUnexpected token '+', "{"a": +1}" is not valid JSONUnexpected token ',', "[1,,2]" is not valid JSONUnexpected token '.', "{"a": .5}" is not valid JSONUnexpected token '<', "…"... is not valid JSONUnexpected token 'I', "{"a": Infinity}" is not valid JSONUnexpected token 'N', "{"a": NaN}" is not valid JSONUnexpected token 'T', "{"a": True, "b"…"... is not valid JSONUnexpected token ']', "[1, 2, 3,]" is not valid JSONUnexpected token 'h', "hello" is not valid JSONUnexpected token 'h', "{"a": hello}" is not valid JSONUnexpected token 'u', "{"a": undefined}" is not valid JSONUnexpected token '', "{"a": 1}" is not valid JSONUnterminated fractional number in JSON at position N (line L column C)Unterminated string in JSON at position N (line L column C)
encoding/json Unmarshal Go go1.22.2
invalid character '"' after object key:value pairinvalid character '"' in \u hexadecimal character escapeinvalid character '+' looking for beginning of valueinvalid character ',' looking for beginning of object key stringinvalid character ',' looking for beginning of valueinvalid character '.' looking for beginning of valueinvalid character '/' looking for beginning of object key stringinvalid character '1' after object keyinvalid character '1' after object key:value pairinvalid character '1' looking for beginning of object key stringinvalid character '2' after array elementinvalid character ':' after array elementinvalid character '<' looking for beginning of valueinvalid character 'I' looking for beginning of valueinvalid character 'N' looking for beginning of valueinvalid character 'T' looking for beginning of valueinvalid character 'Z' in \u hexadecimal character escapeinvalid character '\'' looking for beginning of object key stringinvalid character '\'' looking for beginning of valueinvalid character '\n' in string literalinvalid character '\t' in string literalinvalid character '\x00' in string literalinvalid character ']' looking for beginning of valueinvalid character 'a' looking for beginning of object key stringinvalid character 'g' after top-level valueinvalid character 'h' looking for beginning of valueinvalid character 'u' looking for beginning of valueinvalid character 'x' after object key:value pairinvalid character 'x' in string escape codeinvalid character '{' after top-level valueinvalid character '}' after decimal point in numeric literalinvalid character '}' in numeric literalinvalid character '}' looking for beginning of object key stringinvalid character 'â' looking for beginning of object key stringinvalid character 'ï' looking for beginning of valueunexpected end of JSON input
hjson Node.js 22.22.2
Bad \u char " at line L,11Bad \u char Z at line L,9Bad string at line L,10Bad string at line L,13Bad string containing newline at line L,0End of input while parsing an array (missing ']') at line L,5End of input while parsing an array (missing ']') at line L,6End of input while parsing an object (missing '}') at line L,10End of input while parsing an object (missing '}') at line L,11End of input while parsing an object (missing '}') at line L,12End of input while parsing an object (missing '}') at line L,15End of input while parsing an object (missing '}') at line L,16End of input while parsing an object (missing '}') at line L,22End of input while parsing an object (missing '}') at line L,7End of input while parsing an object (missing '}') at line L,8End of input while parsing an object (missing '}') at line L,9Expected ':' instead of '1' at line L,5Found ',' where a key name was expected (check your syntax or use quotes if the key name includes {}[],: or whitespace) at line L,1Found EOF while looking for a key name (check your syntax) at line L,30Found a punctuator character ',' when expecting a quoteless string (check your syntax) at line L,3Syntax error, found trailing characters at line L,1 >>>{"a":2} {"a":3} ...Syntax error, found trailing characters at line L,8Syntax error, found trailing characters at line L,9
json-bigint Node.js 22.22.2
json_decode PHP 8.3.6
orjson CPython 3.12.3
Input is a zero-length, empty document: line L column C (char N)UTF-8 byte order mark (BOM) is not supported: line L column C (char N)input data is empty: line L column C (char N)invalid escaped sequence in string: line L column C (char N)no digit after decimal point: line L column C (char N)no digit after sign: line L column C (char N)no low surrogate in string: line L column C (char N)number with leading zero is not allowed: line L column C (char N)trailing comma is not allowed: line L column C (char N)unexpected character, expected ',' or ']': line L column C (char N)unexpected character, expected ',' or '}': line L column C (char N)unexpected character, expected ':' after key: line L column C (char N)unexpected character, expected a JSON value: line L column C (char N)unexpected character, expected a string key: line L column C (char N)unexpected content after document: line L column C (char N)unexpected control character in string: line L column C (char N)unexpected end of data: line L column C (char N)
serde_json::from_str Rust (serde_json 1.x)
EOF while parsing a list at line L column CEOF while parsing a string at line L column CEOF while parsing a value at line L column CEOF while parsing an object at line L column Ccontrol character (\u0000-\u001F) found while parsing a string at line L column Cexpected `,` or `]` at line L column Cexpected `,` or `}` at line L column Cexpected `:` at line L column Cexpected value at line L column Cinvalid escape at line L column Cinvalid number at line L column Ckey must be a string at line L column Crecursion limit exceeded at line L column Ctrailing characters at line L column Ctrailing comma at line L column Cunexpected end of hex escape at line L column C
ujson CPython 3.12.3
Key name of object must be 'string' when decoding 'object'No ':' found when decoding object valueUnexpected character found when decoding array value (1)Unexpected character found when decoding array value (2)Unexpected character in found when decoding object valueUnexpected character in unicode escape sequence when decoding 'string'Unmatched '"' when decoding 'string'Unrecognized escape sequence when decoding 'string'
How this registry was built
50 malformed JSON documents were each passed to 21 parsers, and the resulting exception message was recorded verbatim along with the runtime version. That produced 1050 observations and 563 distinct raw messages, which collapse to 401 message signatures once byte offsets and line numbers are templated.
Parsers covered: CPython json.loads, Gson, Gson JsonParser (lenient off), JSON5, JSON::PP, Jackson ObjectMapper, JavaScriptCore JSON.parse, Newtonsoft.Json JsonConvert, Newtonsoft.Json JsonTextReader, Ruby JSON.parse, SpiderMonkey JSON.parse, System.Text.Json Deserialize, System.Text.Json JsonDocument, V8 JSON.parse, encoding/json Unmarshal, hjson, json-bigint, json_decode, orjson, serde_json::from_str, ujson — across 12 runtimes.
All three major browser engines are covered — V8 (Chrome, Edge, Node), SpiderMonkey (Firefox) and JavaScriptCore (Safari) — because a developer searches whatever their browser said, and the three word the same failure completely differently.
Documented gap: older runtime versions. V8 changed its JSON error wording in Node 20, and the
earlier phrasing (Unexpected token } in JSON at position 8) is still widely searched.
Every observation here records the exact runtime version it came from, so a message-by-version
matrix is the natural next step.
Standards this registry is checked against
- RFC 8259 (STD 90) — The JavaScript Object Notation (JSON) Data Interchange Format, T. Bray, Ed., 2017. The IETF Internet Standard for JSON. Obsoletes RFC 7159 and RFC 4627.
- ECMA-404, 2nd edition — The JSON Data Interchange Syntax, Ecma International, 2017. Ecma’s grammar for JSON. A normative reference of RFC 8259; the two define the same syntax.
- The Unicode Standard — The Unicode Standard, Core Specification, The Unicode Consortium, current. Normatively referenced by RFC 8259 for the definition of a character.
- IEEE 754-2019 — IEEE Standard for Floating-Point Arithmetic, IEEE, 2019. Referenced by RFC 8259 §6 as the basis for its interoperability guidance on numbers.
Only standards bodies and peer-reviewed venues are cited. Error strings on this site are observed by executing each parser; the standards above define what the parser is reacting to.
Browse the full tool list — formatting, validation, conversion, patching, canonicalization and type generation, all running in your browser.