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 / The input does not contain any JSON tokens. Expect
System.Text.Json Deserialize · .NET 8.0.30

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.

This message comes from System.Text.Json Deserialize on .NET 8.0.30. In this registry it is produced by 2 distinct mistakes. Positions in the real message vary with your input; the causes do not.

What produces this message

Empty string passed to a JSON parser

Input

Exact message: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0.

Fix: Check for an empty body before parsing, and log the status code and content-length alongside it.

Whitespace-only input

Input
   
	 

Exact message: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 1 | BytePositionInLine: 2.

Fix: Treat whitespace-only as empty and handle it before parsing.

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 end of input at 1:1JSON5: invalid end of input at 2:3
JSON::PPmalformed JSON string, neither array, object, number, string or atom, at character offset N (before "…")
JavaScriptCore JSON.parseJSON Parse error: Unexpected EOF
Ruby JSON.parseunexpected token at '…'
SpiderMonkey JSON.parseJSON.parse: unexpected end of data at line L column C of the JSON data
System.Text.Json JsonDocumentThe 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.
V8 JSON.parseUnexpected end of JSON input
encoding/json Unmarshalunexpected end of JSON input
json-bigintUnexpected ''
json_decodeSyntax error
orjsonInput is a zero-length, empty document: line L column C (char N)input data is empty: line L column C (char N)
serde_json::from_strEOF while parsing a value 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.