Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's simply easier to determine when an object ends with a delimiter...

    {"dtm":"2016-...",...,meta:{...}}
That requires more complicated input processing/streaming than read until '\n' then parse the record...


Not meaningfully more complicated. You know when you've reached the end of your object of you are actually parsing it, so you also know when the next one can begin.


Actually, no, one is not necessarily parsing it. Xyr point was that using line delimiters allows one to retain one-log-record-per line semantics and use the log stream with text processing tools that understand those semantics but that do not understand JSON.


When you're working with a platform that has native JSON parsing, it generally doesn't support streams as described... so you either count braces and quotes, create a stream processor or use a delimiter... a delimiter is an easy enough solution, also allows for easier viewing in a text editor. It's about being pragmatic.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: