3 ms·
This sounds an awful lot like yet another ProtocolBuffers. What, if anything, new does it bring to the table?
by Ralith 15y ago
This sounds an awful lot like yet another ProtocolBuffers. What, if anything, new does it bring to the table?
- ericmoritz 15y agoThis is schemaless. Protobufs require a .proto file that describes the data being serialized. A .proto file serves a similar purpose as the `struct` keyword in C. MessagePack uses type prefixes to describe the data. For instance an unsigned 8-bit int starts with a `0xcc` followed by a byte.
- frsyuki 15y agoSchemaless (dynamic typing) is the most obvious difference. I wrote about the pros/cons of schema here: http://news.ycombinator.com/item?id=2836242 http://news.ycombinator.com/item?id=2836242
- frsyuki 15y agoCompatibility with JSON is a characteristic of MessagePack. If you're already using JSON, you can use MessagePack as a faster/smaller substitution of JSON. Since Protocol Buffers brings their original semantics, you must change lots of codes.