4 ms·
CBOR or MsgPack are binary JSON-like encodings. ProtoBuf depend on the schema definitions and encoder/decoder generation. Without the schema, you cannot read t
by wirrbel 9y ago
CBOR or MsgPack are binary JSON-like encodings.
ProtoBuf depend on the schema definitions and encoder/decoder generation. Without the schema, you cannot read the format (theoretically), if you want your data to be read easily, JSON or CBOR or MsgPack are your best options.
- ithkuil 9y agoEncoding/decoding of protobufs can be done dynamically if you know the schema.
- wirrbel 9y agoknowing the schema also means knowing the right revision of the schema. If you store messages for a while, this already can be a problem.
- ithkuil 9y agoschemaless is never really schemaless: the code that accesses your data is implicitly assigning it a schema, so you'll have the same problem. FWIW, protobuf schemas are designed to be friendly for back and forward compatibility; unknown fields can be ignored and "required fields are generally considered harmful", interesting read: https://github.com/google/protobuf/issues/2497 https://github.com/google/protobuf/issues/2497
- RantyDave 9y agoI've been using cbor with python and it's been just fantastic. In particular it: Can send a "None"; Can tell the difference between bytes and unicode; and is real fast.