Protocols
Saved & recent

MessagePack

Also called: MessagePack serialization, msgpack

MessagePack is a binary serialization format for values such as integers, strings, arrays and maps. It provides compact encodings for small values and distinguishes text from arbitrary binary data. Extensions let applications assign additional types, but participants still need to agree on the meaning of those extension codes.

For example, [1, 2, 3] becomes the hexadecimal bytes 93 01 02 03: a fixed-size array header followed by three small integers. CBOR represents the same array with a different header, so the formats are not interchangeable. Choosing MessagePack does not by itself establish a message’s application schema, delivery guarantees or which operations a receiving service should perform.

Read first
Serialization
Related
Serialization, Concise Binary Object Representation, Schema evolution
Further reading
MessagePack — format specification
[1, 2, 3] 93 01 02 03 fixarray header three integer elements 93 83 MessagePack CBOR different format headers · hexadecimal
MessagePack’s 93 array header differs from CBOR’s 83 even when the values being represented are identical.

View in the full Protocols collection