Concise binary object representation

from Wikipedia, the free encyclopedia
Concise binary object representation
File extension : .cbor
MIME type : application / cbor
Developed by: Carsten Bormann

Technology Center for Computer Science and Information Technology, University of Bremen

Initial release: 2013
Type: binary
Container for: z. B. JSON, CBOR (through tagging)
Standard (s) : RFC 7049
Website : http://cbor.io/

The Concise Binary Object Representation ( CBOR ) is a binary compact data format for serialization . It is based on JSON and, like this, is used for data exchange between applications. It should enable higher processing and transmission speeds, but sacrifices the plain text readability. CBOR is specified by the IETF as an Internet standard in RFC 7049 .

Motivation and comparison with similar technologies

There are a number of formats similar to CBOR for the binary representation of structured data. In the opinion of the authors, however, none of them follow the specific development goals on which CBOR is based:

  1. unambiguous coding of the most common Internet standards (primarily all options offered by JSON plus binary strings)
  2. compact code for encoders and decoders, so that systems with limited performance in terms of processor performance, memory and instruction set can serve as target systems
  3. Data should be able to be decoded without the need for a schema, ie the encoded data should be self-descriptive.
  4. The serialization should be "halfway" compact. An equivalent JSON coding is regarded as the upper limit. The desire for compactness is, however, subordinate to that for simplicity of the (de) encoder.
  5. Applicability in "restricted" as well as in "high-volume" environments, ie in terms of processor performance, implementations should be frugal so that they can be used on the smallest hardware units on the one hand, but can also offer high throughput on high-end systems at the same time .
  6. The format should be able to convert all JSON data types to and from JSON.
  7. The format should be expandable and additional data must be backwards compatible, ie it must be able to be read by older implementations. The format is designed for decades of use.

In the CBOR specification, the comparison is made to the following formats:

  • ASN.1 DER, BER, PER
  • MessagePack - has similar properties and is relatively widespread. In addition to serialization similar to JSON, it is also used for long-term data archiving. Is difficult to expand and further development is hindered by the desire for backward compatibility with existing data.
  • BSON - "binary JSON", introduced by the NoSQL database MongoDB . Is less compact and clearly optimized for use in the database. Unclear expandability.
  • UBJSON - Only implements exactly the JSON data model. Serialization geared towards human readability rather than compactness.

Individual evidence

  1. ^ A b Carsten Bormann, Paul Hoffman: Concise Binary Object Representation (CBOR). Retrieved February 17, 2019 .