4 ms·
What’s the difference between terminators and separators here? The ndjson spec [0] doesn’t say anything like that, and it seems that ndjson and jsonlines are id
by Kwpolska 3y ago
What’s the difference between terminators and separators here? The ndjson spec [0] doesn’t say anything like that, and it seems that ndjson and jsonlines are identical in what documents they accept.
[0]: https://github.com/ndjson/ndjson-spec https://github.com/ndjson/ndjson-spec
- nasso_dev 3y agoim guessing: all values must always end with a terminator, but a separator doesn't need to be present after the last value i.e. a documemt without a newline at the end is valid jsonl, but invalid ndjson
- yencabulator 3y agoA separator separates two records, where as a terminator terminates a record. You can detect and error out if you see an unterminated record at end of transmission. With separators, the producer might not put a separator after the last record, because there's nothing to separate it from there. There's no justification for not using terminators, it's just a bad spec. Unsurprising story: the variant with better marketing has less technical chops.