Graph
Concise Binary Object Representation

📦Concise Binary Object Representation

NEW

Also known as: CBOR

A compact binary data format designed for small code and message sizes with extensibility for efficient serialization.

DESCRIPTION

CBOR is a binary serialization format intended to be efficient for constrained environments and general-purpose data interchange. It supports rich data types, tags, and schema-less encoding, making it flexible and compact. CBOR aligns conceptually with JSON but is binary and more efficient on the wire. It is standardized by IETF (RFC 8949), with registries for tags and content formats. CBOR integrates with COSE for secure signing and encryption.

ALTERNATIVE DEFINITIONS

IETF RFC 8949

Concise Binary Object Representation (CBOR) is a data format whose design goals include the possibility of extremely small code size, fairly small message size, and extensibility without the need for version negotiation.

Authoritative standard emphasizing size efficiency and extensibility.

Source

CBOR Project

CBOR is a binary data serialization format inspired by JSON that has been designed to be small and extensible.

Plain-language intro tying CBOR to JSON for familiarity.

Source

JSON BSON Serialization COSE

COMPETING TERMS

Protocol Buffers MessagePack Avro

KNOWLEDGE AREAS

Data Integration & Interoperability Platform & Tooling Software Engineering IoT & Edge Data

TARGET AUDIENCE

Software Developer Data Engineer Cloud Architect Data Architect

EXTERNAL SOURCES

  • Wikipedia - CBOR
  • IETF - Official CBOR specification
  • IANA - Registered CBOR tags
  • IETF - CDDL for CBOR and JSON

TOP QUESTIONS

Why use CBOR over JSON?

CBOR is binary, smaller, and faster to parse, making it well-suited for constrained devices and high-throughput services.

Category: Benefits

How does CBOR compare to Protocol Buffers?

CBOR is schema-less by default and extensible with tags; Protocol Buffers are schema-first and compact, with strong typing via .proto files.

Category: Differences

What are typical CBOR use cases?

IoT messaging, firmware metadata, inter-service data exchange, and secure payloads with COSE.

Category: Use Cases

Is CBOR standardized?

Yes, it is specified by IETF RFC 8949 with IANA registries for tags and content formats.

Category: Standards

How do I validate CBOR structures?

Use CDDL (RFC 8610) to define and validate expected structures for CBOR data.

Category: Best Practices

What are common pitfalls with CBOR?

Relying on implicit semantics of tags without agreement and mismatched canonicalization for signatures can cause interoperability issues.

Category: Mistakes

Does CBOR support custom types?

Yes, via tags that annotate encoded data, allowing extensibility while preserving base types.

Category: Capabilities

How does CBOR handle security?

Use COSE for signing and encryption, and canonical CBOR for deterministic signatures.

Category: Security

Is CBOR suitable for streaming?

Yes, it supports incremental parsing and indefinite-length items for streaming scenarios.

Category: Application