3 ms·
C structs are really, really brittle; CSV is alarmingly complicated (unicode); JSON can't pass "None". I like CBOR, myself.
by RantyDave 7y ago
C structs are really, really brittle; CSV is alarmingly complicated (unicode); JSON can't pass "None". I like CBOR, myself.
- mrmonkeyman 7y ago"clue": null
- nyuszika7h 7y ago> JSON can't pass "None" What about null?
- RantyDave 7y agoAhh, then I might be talking crap. I'll check it out, thanks.
- CoolGuySteve 7y agoCBOR has extremely slow encoding/decoding in C/C++ when compared to structs. Nothing is perfect.
- RantyDave 7y agoFor sure, compared to structs. Which you can almost certainly RDMA from one place to another. It's a little bit apples and oranges though since CBOR is self describing (and very lightly compressed). Shameless plug: https://github.com/RantyDave/cppbor https://github.com/RantyDave/cppbor
- acoard 7y agoYou can pass null, undefined, or remove the property. JSON Schema – a whole topic unto itself – gives you further control over locking down how this can be represented (e.g. field MUST be present but can be string matching this regex or null).