▲ | thechao a day ago | |||||||
I do a lot of very low level programming with awful performance-maintenance trade-offs. Here's a great trick for a "binary" JSON: remove all of the extra whitespace, normalize your numbers, and the LZ4 the resulting string. UTF-8 is already a great wire format. I've never found a "binary JSON" that's significantly better than this; I mean you can beat it, but you need awkward encodings (prefix indices & other weird shit). You end up burning nearly-byte for any particularly clever integer encoding. Most data structures are just nested arrays of integers. If you need an integer keyed OBJECT you're SOL, but I just play fiddly games with astral plane UTF-8 characters. (Yeah yeah yeah ad hoc encodings are nasty news.) If you've got a BUTT LOAD of data just fire up a compressing SQLite DB like a normal human. | ||||||||
▲ | a day ago | parent | next [-] | |||||||
[deleted] | ||||||||
▲ | js8 a day ago | parent | prev [-] | |||||||
If you're interested in performance, what about all the number conversion (to decimals, presumably) that is incurred with JSON? | ||||||||
|