Assembling a stream back into a document.
Each non-empty line is parsed independently and the results are collected into an array. Blank lines are skipped, so a file ending in a newline — which is what every writer produces — does not become a null element.
Why it fails, precisely
- ▸The error names the line that broke, because a single malformed record does not corrupt the ones around it. That is the practical advantage over a pretty array, where one missing comma loses the whole file.
- ▸A pretty-printed document fails on its first line, since
[alone is not a record. Minify it first, or convert it with the formatter. - ▸A truncated final line fails on its own and tells you where the writer stopped — useful when you are auditing a log that was cut off.
{"id":1}
{"id":2} [
{ "id": 1 },
{ "id": 2 }
] NOTE Once the records are an array, every other module applies to them: convert to CSV, generate a schema across all samples, or find the shape the records do not agree on. The NDJSON for log pipelines guide covers the shell side — splitting a stream safely, keeping a record pair together for bulk APIs, and what to do when one line is truncated.
What you get on this page
- ▸Each non-empty line parsed as JSON
- ▸Blank lines ignored automatically
- ▸Invalid lines reported with an error
- ▸Copy or download the resulting array
Because bracekit is a static application, this page loads quickly, caches well and never sends your data to a parsing server. Your formatting preferences, recent documents and snippets stay in local storage.