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

My take, based on principles and reason (but not enough experience so take with a grain of salt) is that a json document is a message. If it doesn't fit in a message (whatever that means for your use case), you send multiple messages over a stream, or append them to a log file. Encoding wise, a newline character is a conventional and simple way to separate human readable messages. I believe this is called JSONL. Golangs json encoder does this by default.

It follows that json is not a database, and the fact that it's tempting to use it as such is no fault of json.

I'm not ready to say json is better than csv, but I dislike that csv has a rigid table structure but no types. It feels like combining sweat pants with a tie. I also dislike that csv has different conventions around quoting and such. I don't feel comfortable editing csvs by hand. It's possible I'm wrong and I just never learnt it correctly, but experience tells me to trust that feeling.



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

Search: