top | item 10998244

(no title)

nornagon | 10 years ago

How does this compare to other similar specifications, e.g. MsgPack and BSON?

discuss

order

rspeer|10 years ago

From what I've read of the spec so far: msgpack has a confusion between text and binary data baked into it that will probably never be resolved, and CBOR deliberately fixes that.

It also seems to have a better implementation of streaming data than msgpack. In msgpack, streaming is something you have to implement outside of the format itself, possibly by concatenating together many msgpack representations. CBOR has a way to say "here comes a streaming list, I'll tell you when it's done".

BSON is a representation of MongoDB's data model and doesn't make that much sense to use without MongoDB.

I currently use msgpack for a lot of things, but if CBOR's Python library is good enough, I might switch.

Matthias247|10 years ago

Afaik newer versions of messagepack added an extra type to have string and binary now seperated.

I read somewhere that CBOR was better designed for extensibility, but don't know anything further about it.

One difference (on the non-technical side) is that CBOR is standardized through IETF.

brianolson|10 years ago

I wrote the Python CBOR implementation you get if you `pip install cbor`. Source project here: https://bitbucket.org/bodhisnarkva/cbor It's getting pretty extensive use at a few places I know, so I hope it's good enough!

Zash|10 years ago

There's a comparison at the end of the specification: http://tools.ietf.org/html/rfc7049#appendix-E

Having written an implementation (the Lua one) I quite like this format, it's flexible, not too complicated and still quite compact.

edwintorok|10 years ago

How does it compare to UBJSON?

calibraxis|10 years ago

Comparisons to Fressian and Transit would be interesting too.