JSON to NDJSON
One object per line, nothing flattened. An array becomes its lines; an object with a list inside becomes that list, with the rest of the object on every line.
What you get
- Writes the paginated list as 3 lines — one per object in data, the page fields on each
- Writes the order sample as 2 lines — its items, with the order on every line
- Keeps every value as it was: nested objects stay nested, numbers stay numbers, nothing is flattened or renamed
- Copies or downloads the .ndjson; opens the same text in the app for the tree and the rest
What it will not do
- Guess which list is the rows when a document holds several — it says so and asks you to focus a branch in the app.
- Flatten. A nested object stays a nested object on its line; a stream reads it back as it was.
- Send your text anywhere. The page is static and the engine runs in this tab — open the network panel and watch it stay empty.
What becomes a line
- An array → one object per line
[{"id":1},{"id":2}]{"id":1} {"id":2}- An object with a list → the list, with the rest on every line
{"page":1,"data":[{"id":1},{"id":2}]}{"id":1} {"id":2}- One object → one line
{ "id": 1, "ok": true }{"id":1,"ok":true}- A nested object
Stays nested on its line — NDJSON is JSON per line, so nothing is flattened.
The sample
What the first sample opens — a real file, not an illustration written for this page.
in VS Code
Convert, then NDJSON — from a document, a selection or a rows file, into a new editor.
Questions
What is NDJSON?
Newline-delimited JSON: one complete JSON value per line, no commas between them and no outer brackets. JSON Lines and .jsonl are the same thing under another name.
My JSON is an object, not an array. What happens?
Its main list becomes the lines and the rest of the object rides on every line — a paginated response with a data array converts to one line per item, each carrying the page fields.
Can I go the other way?
Yes — the NDJSON to JSON page reads lines back into one array, and names any line that will not parse.