I was wondering how this compared to jsonlines/jsonl <a href="https://jsonlines.org" rel="nofollow">https://jsonlines.org</a><p>> This page describes the JSON Lines text format, also called newline-delimited JSON.<p>And then I saw this at the bottom of the ndjson.org page:<p>> Site forked from jsonlines.org<p>So is this a fork of the site only, or a fork of the jsonlines standard?
This is an awful lot of foofaraw to basically say "no newlines in your stream of discrete messages except between messages". The proposal appears to have absolutely nothing to do with JSON, and the only connection is that their example messages happen to be JSON but could just as easily be anything else.
Why not just use YAML, which accomplishes effectively the same goals, and already has a decent amount of traction?<p>In general I use YAML for human-edited configuration files, because they generate clean diffs, and JSON for machine-to-machine communication, because of the wealth of obscenely optimized parsnips for every language.
I've done a similar thing with Lisp sometimes: implementing hacks so that a list in a file always looks like this:<p><pre><code> ((lorem ipsum ..)
(quorat est demonstrandum ...)
...
...)
</code></pre>
Only major line-breaks between top-level elements.
basically json streams?
<a href="https://en.wikipedia.org/wiki/JSON_streaming" rel="nofollow">https://en.wikipedia.org/wiki/JSON_streaming</a><p>In my day job we ndjson pretty extensively and it's been pretty good to us. It has far better characteristics than passing a giant json array of objects (you have to hit the closing bracket on the array to know if it's valid)
Why not throw in the inline comments feature to the mix if you're gonna end up using a different spec/different parser anyway? This is an 8+ year old spec and I don't think it has caught much adoption.<p>If you're really into hot having commas, maybe you can do a post-processing step with sed or in-memory string replacement to add/remove "," and \n? Then you're still getting the same JSON experience under the covers where programs process it?