4 ms·
EDIT : Comment based on wrong assumption : string are actually smaller than in JSON, see judofyr comment. I have to disagree on that news title, for the "It's
by oelmekki 14y ago
EDIT : Comment based on wrong assumption : string are actually smaller than in JSON, see judofyr comment.
I have to disagree on that news title, for the "It's like JSON" part.
As pointed out in a link[1] of Someone in an other comment here :
> A major use case of MessagePack is to store serialized objects in memcached.
This also seems very relevant (in article linked from here):
> typical short strings only require an extra byte in addition to the strings themselves.
So, stored strings are actually bigger (even only by one bit) than plain text json.
Of course, I'm biased because I'm a webdeveloper, but I see JSON mainly as a message exchange format, meant to communicate across languages and, most of the time, to communicate between server side and client side. Typically, I'll use server side helpers to format strings like value with currency, i18n messages, etc, which makes a lot of strings in any JSON document transmitted.
The original author made it clear it was not intended for server/client side communication : it's a very specific format intended to offer better performances on very specific use cases (I would rather know how it compares to BSON than to JSON).
JSON, on the other hand, is a generalist exchange format. Messagepack is definitely not like JSON.
[1] http://news.ycombinator.com/item?id=4092969 http://news.ycombinator.com/item?id=4092969
- judofyr 14y ago> > typical short strings only require an extra byte in addition to the strings themselves. > So, stored strings are actually bigger (even only by one bit) than plain text json. Strings in JSON require two bytes (the quotes) in addition to the string itself.
- oelmekki 14y agoOh, I see. I thought it meant "one bit more than JSON". Thanks for fixing it.