MessagePack: like JSON, but fast and small
> MessagePack: It's like JSON. but fast and small<p><i>and complete</i>.<p>Both are minimal self describing data serialization formats, but JSON is incomplete. <i>It misses a type to represent one of the fundamental type: byte blobs</i>. And also parts of floats.<p>Which means there are a lot inconsistent ways to hack that in e.g. base64 encoded strings. But this means it's loosing partially it's property of being self-describing (same if you allow numbers as strings e.g. "-12").<p>Just to be clear I'm not saying JSON should have bytes directly in it. But a "native" base64 string additional to string, number, null, list and map would help. E.g. `{ "bytes": b"YWJjZGU=" }`<p>Wrt. floats it's missing (+/-) Infinity, NaN is more like a error variant so it's okish to be missing, but then why not have it.<p>Also for completeness it would be better to differentiate between int and float as float is imprecise due to rounding errors.<p>----<p>PS: I don't like `null` but having it in this kind of data serialization format is still required. But the difference between a field not being there and it being `null` can be a mess and not all tools handle it well.<p>PPS: Both JSON and MsgPack can be used for non self describing serialization, e.g. by serializing the a record (fixed number of fields in known order) as a list of values instead of a mapping. But both are focused on enabling self describing serialization.<p>EDIT: PPPS: Yes, it's a very weak form of self-describing is use here, there are systems which are much more self describing e.g. XML+XML Schema linked from the XML document but also tend to be far more complex