(no title)
dlsym | 10 years ago
["Name", "Session", "Score", "Completed"]
["Gilbert", "2013", 24, true]
would be "Name", "Session", "Score", "Completed"
"Gilbert", "2013", 24, true
Which is, well, more or less just CSV.
This should work with objects too: "name": "Jane", "key": { "nested": "object" }, "foo": ["bar"]
Or mixed: "Foo", { "fnord": 23 }, true
sandstrom|10 years ago
For the above to work you'd have to use a custom JSON-parser when reading the lines.
------------
Could also be mentioned that JSONLines-like formats are already pretty common in log-files, database exports etc. So this is more about giving it a name and standardizing it. Which I think is great!
mtdewcmu|10 years ago
Not necessarily. You could just re-add the square brackets before passing the lines to the JSON parser.
That would make more work for the machine, because you'd probably have to copy the whole string. But any time you can make less work for the human by making the machine work a little harder, it's usually a win.
Cidan|10 years ago