This looks like a superior way to use JASON:–> JASONL
Am I understanding this correctly that this is all valid JSON, just with a convention to use newlines for human readability?
Agreed. It is nicely readable, but that isn’t primary purpose of JSON.
I do like the idea of some sort of script that could convert JSON into that format just to preview (or edit I suppose).
No - it is faster and doesn’t load the entire code before running it - it does it line by line and skips errors in layout. It looks like a much better way to use JSON syntax
why they not show a example with decimal, date time values or binary data.
json is horror if everything can be there or not if you use a rest api.
repeating the columns as key every row is for bigger data exchange impractical.
But it will zip efficiently.
As an XML user, I see this as much more approachable than ‘standard’ JSON
It depends on the use case.
For further processing, unzipping adds another step.
OT
if possible i like to use Object Serialization and Deserialization.
xojo should provide this essential feature and look how ms c# do it.
the good thing at Serialization/Deserialization is you can save and load(restore) complex hierarchy of objects.
in asp .net you can have a web service input with json or xml and it create/map it to a handy object.
Sorry, I had to ask ChatGPT for the differences:
The main difference is structure:
JSON
A single valid JSON document containing one value—often an object or array.
{
"name": "Alice",
"age": 30
}
Or multiple records in an array:
[
{"name": "Alice", "age": 30},
{"name": "Bob", "age": 25}
]
JSONL / JSON Lines
A text file where each line is a separate, valid JSON value, usually an object.
{"name": "Alice", "age": 30}
{"name": "Bob", "age": 25}
{"name": "Charlie", "age": 35}
Key difference
| JSON | JSONL | |
|---|---|---|
| Structure | One JSON document | One JSON value per line |
| Multiple records | Usually an array | Separate lines |
| Streaming | Less convenient | Excellent |
| Common use | APIs/config files | Logs, datasets, ML pipelines |
Rule of thumb: Use JSON for structured documents; use JSONL when you have lots of independent records that you want to process one at a time.
I have used JSONL once already (at Codex’s suggestion). I can’t remember the exact case for it (probably serialization of lots of records), but I do remember that it fit the bill for what I needed.
Not a fan. I usually pack my data in pure JSON near to TOML.
Regular JSON: (99 bytes)
[
{"name": "Alice", "age": 30},
{"name": "Bob", "age": 25},
{"name": "Charlie", "age": 35}
]
JSONL: (87 bytes)
{"name": "Alice", "age": 30}
{"name": "Bob", "age": 25}
{"name": "Charlie", "age": 35}
Structured JSON: (72 bytes)
I designed the structure, so I know that the first line carries the columns’ titles and the rest are values
[
["name", "age"],
["Alice", 30],
["Bob", 25],
["Chalie", 35]
]
Same as above, just one liner packed for computers, not humans: (55 bytes)
[["name","age"],["Alice",30],["Bob",25],["Chalie",35]]