17 chars · 2 lines
Two-way sync · Edit either side and the other updates automatically.
{"id":2}17 chars · 2 lines
Two-way sync · Edit either side and the other updates automatically.
{"id":2}JSON document structure
A parser finishes after the first root object and then encounters another non-whitespace token. If the source intentionally emits one JSON value per line, it is JSONL/NDJSON and should be processed with a line-oriented parser instead. This tool is free to use. No account or payment is required.
Last updated
The root can be an object, array, string, number, boolean, or null, but once that value finishes only whitespace may follow. Another { starts a second document rather than extending the first.
JSONL keeps each line independently parseable and avoids loading a huge top-level array. If the source is intentionally record-oriented, use a JSONL parser rather than rewriting every stream into standard JSON.
The two objects are valid separately but invalid as one standard JSON document. An array is one possible combined representation.
{"id":1}
{"id":2}[
{"id":1},
{"id":2}
]Common questions
No. Standard JSON contains one root value. Additional non-whitespace content after that value makes the document invalid.
Not as one standard JSON document. It is commonly treated as JSONL or NDJSON, where each line is parsed independently.
Only when the consumer expects one collection. For streaming or log data, JSONL may be the better representation.
Debugging a specific JSON issue? Browse JSON troubleshooting.