Formatter Validator Minifier Escape / Unescape JSON ↔ String JSON ↔ YAML JSON → CSV NDJSON / JSON Lines JSON → Types JSON ↔ XML JSON Diff JSON Patch Canonicalize (RFC 8785) Schema Validator Schema Generator JSONPath Tester JWT Decoder JSON Errors Schemas More Tools
JSONTools / JSON errors / no digit after sign: line L column C (char N)
orjson · CPython 3.12.3

no digit after sign: line L column C (char N)

This message comes from orjson on CPython 3.12.3. In this registry it is produced by 3 distinct mistakes. Positions in the real message vary with your input; the causes do not.

What produces this message

Bare minus sign where a number was expected

Input
{"a": -}

Exact message: no digit after sign: line 1 column 8 (char 7)

Fix: Emit `null` or `0` when the value is missing, and check your template for an unsubstituted placeholder.

Leading decimal point in a JSON number

Input
{"a": .5}

Exact message: no digit after sign: line 1 column 7 (char 6)

Fix: Write `0.5`.

Leading plus sign in a JSON number

Input
{"a": +1}

Exact message: no digit after sign: line 1 column 7 (char 6)

Fix: Drop the plus, or quote the value if the sign is meaningful text.

What other parsers say about the same input

If a colleague reports a different message for what looks like the same file, this is why.

Parser Message for the same inputs
CPython json.loadsExpecting value: line L column C (char N)
JSON5JSON5: invalid character '}' at 1:8
JSON::PPmalformed JSON string, neither array, object, number, string or atom, at character offset N (before "…")malformed number (no digits after initial minus), at character offset N (before "…")
Jackson ObjectMapperUnexpected 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 46)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')Unexpected character ('}' (code 125)) in numeric value: expected digit (0-9) to follow minus sign, for valid numeric value
JavaScriptCore JSON.parseJSON Parse error: Invalid numberJSON Parse error: Unexpected token '.'JSON Parse error: Unrecognized token '+'
Newtonsoft.Json JsonConvertInput string '-' is not a valid number. Path 'a', line L, position N.Unexpected character encountered while parsing value: +. Path 'a', line L, position N.
Newtonsoft.Json JsonTextReaderInput string '-' is not a valid number. Path 'a', line L, position N.Unexpected character encountered while parsing value: +. Path 'a', line L, position N.
Ruby JSON.parseunexpected token at '…'
SpiderMonkey JSON.parseJSON.parse: unexpected character at line L column C of the JSON dataJSON.parse: unexpected non-digit at line L column C of the JSON data
System.Text.Json Deserialize'+' 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 within a number, immediately after a sign character ('+' or '-'). Expected a digit ('0'-'9'). Path: $ | LineNumber: L | BytePositionInLine: C.
System.Text.Json JsonDocument'+' is an invalid start of a value. LineNumber: L | BytePositionInLine: C.'.' is an invalid start of a value. LineNumber: L | BytePositionInLine: C.'}' is invalid within a number, immediately after a sign character ('+' or '-'). Expected a digit ('0'-'9'). LineNumber: L | BytePositionInLine: C.
V8 JSON.parseNo number after minus sign in JSON at position N (line L column C)Unexpected token '+', "{"a": +1}" is not valid JSONUnexpected token '.', "{"a": .5}" is not valid JSON
encoding/json Unmarshalinvalid character '+' looking for beginning of valueinvalid character '.' looking for beginning of valueinvalid character '}' in numeric literal
hjsonEnd of input while parsing an object (missing '}') at line L,8End of input while parsing an object (missing '}') at line L,9
json-bigintBad numberUnexpected '+'Unexpected '.'
json_decodeSyntax error
serde_json::from_strexpected value at line L column Cinvalid number at line L column C
ujsonExpected object or value

← All JSON parser errors

Standards this registry is checked against

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.