Feedback wanted: I made a drop-in JSON replacement that produces smaller payloads. It's for busy programmers who want a quick win. https://evanhahn.com/jsos-proof-of-concept/
It might be a bad idea! Please let me know what you think.
#JSON #compression #programming
Proof of concept: drop-in JSON replacement that produces smaller payloads
What if your JSON payloads got smaller by changing one line of code? I made a proof of concept.evanhahn.com
treefit
in reply to Evan Hahn • • •do you have a spec somewhere for this? and what kind of bugs can occur by the "prior art" solutions like cbor, msgpack(and so on)?
https://msgpack.org has some graphic in the banner on top of the page that gives some insight on how the binary is stored, how did you store it?
Speed and CPU usage will also matter in the end so if you further pursue it some benchmarks would be nice, I like looking at benchmark graphs ;)
MessagePack: It's like JSON. but fast and small.
msgpack.orgEvan Hahn
in reply to treefit • • •@treefit No spec, but I will definitely write one if I pursue this idea further.
Basically, each value has a one-byte header followed by data. For example, the header for int32 is 0x32, followed by four bytes that encode the number. (Some data is small enough to be stuffed into a header—for example, 0xF0 is the same as the literal 0, 0xF1 is the same as literal 1, and so on.)
This is all helpful feedback. Thank you!