-
Notifications
You must be signed in to change notification settings - Fork 59
Why CBOR
Faye Amacker edited this page Dec 28, 2021
·
2 revisions
Some projects using fxamacker/cbor replaced protobuf, encoding/json, or encoding/gob. For example, by replacing gRPC+protobuf with gRPC+CBOR.
Reasons for using CBOR include:
-
CBOR is an IETF Internet Standard designed to be relevant for decades without breaking changes.
-
CBOR is designed to offer extensibility without the need for version negotiation.
-
Data is self-describing and avoids problems caused by generated code (or schemas) being out of sync with data.
-
Data is smaller and more efficient to process than JSON. And CBOR's generic data model is a superset of JSON's.
-
Using CBOR can reduce time spent maintaining large systems, especially when used with Go struct tags like
toarray
andkeyasint
provided by fxamacker/cbor.