logoalt Hacker News

Levitatingtoday at 2:19 AM5 repliesview on HN

JSON is human-readable, why even compare it with this. Is any serialization format now just a "JSON alternative"?


Replies

Gormotoday at 12:09 PM

It's also quite odd to create a serialization format optimized for random access.

show 1 reply
jy14898today at 9:36 AM

Came to the same conclusion the moment I had to hunt to see the outputs https://github.com/creationix/rx/tree/main/samples

creationixtoday at 3:34 AM

- this encodes to ASCII text (unless your strings contain unicode themselves) - that means you can copy-paste it (good luck doing that with compressed JSON or CBOR or SQLite - there is a scale where JSON isn't human readable anymore. I've seen files that are 100+MB of minified JSON all on a single very long line. No human is reading that without using some tooling.

show 3 replies
dietr1chtoday at 2:33 AM

cat file.whatever | whatever2json | jq ?

(Or to avoid using cat to read, whatever2json file.whatever | jq)

show 1 reply