{
  "slug": "protocol-buffers",
  "term": "Protocol Buffers",
  "aliases": [
    "Protobuf",
    "Google Protocol Buffers"
  ],
  "definition": "Protocol Buffers is a schema-driven serialization system that represents structured messages as numbered fields in a binary wire format.",
  "note": "Schema: Binary records carry field numbers, wire types and payloads. The message definition supplies field names and declared types; one wire type can represent several schema types. Preserve the relevant schema with long-lived data. [protobuf-encoding]\n\nFraming: A top-level message is not self-delimiting. Multiple messages in a file or stream need an external boundary convention, such as length prefixes. Length-delimited fields inside a message do not remove this requirement. [protobuf-techniques]\n\nPresence: Implicit presence cannot preserve whether a default-valued basic field was explicitly set. Explicit presence retains that distinction. Proto3 optional basic fields, singular message fields and oneof members track presence; repeated fields and maps do not distinguish empty from absent. [protobuf-presence]\n\nEvolution: Proto3 binary parsing and reserialization preserve unknown fields, but conversion to JSON or field-by-field copying can discard them. Adding fields can be binary-safe while older ProtoJSON readers reject newly populated fields. Ignoring unknown JSON fields avoids rejection, not information loss. [protobuf-proto3] [protobuf-json]\n\nIdentity: Deterministic binary serialization is not canonical across schema, build or library changes. Unknown-field retention also does not promise original bytes. Define whether recovery requires byte identity, field presence or application-level values. [protobuf-canonical]",
  "related": [
    "data-serialization",
    "variable-length-integer",
    "zigzag-encoding"
  ],
  "citations": [
    {
      "id": "protobuf-encoding",
      "title": "Protocol Buffers: Encoding, Message Structure and wire types",
      "url": "https://protobuf.dev/programming-guides/encoding/",
      "accessed": "2026-11-21"
    },
    {
      "id": "protobuf-techniques",
      "title": "Protocol Buffers: Techniques, Streaming Multiple Messages",
      "url": "https://protobuf.dev/programming-guides/techniques/#streaming",
      "accessed": "2026-11-21"
    },
    {
      "id": "protobuf-presence",
      "title": "Protocol Buffers: Field Presence, implicit and explicit disciplines",
      "url": "https://protobuf.dev/programming-guides/field_presence/",
      "accessed": "2026-11-21"
    },
    {
      "id": "protobuf-proto3",
      "title": "Protocol Buffers: Language Guide (proto3), Unknown Fields",
      "url": "https://protobuf.dev/programming-guides/proto3/#unknowns",
      "accessed": "2026-11-21"
    },
    {
      "id": "protobuf-json",
      "title": "Protocol Buffers: ProtoJSON Format, JSON Wire-compatible Changes",
      "url": "https://protobuf.dev/programming-guides/json/#compatible-but-with-unknown-field-handling-problems",
      "accessed": "2026-11-21"
    },
    {
      "id": "protobuf-canonical",
      "title": "Protocol Buffers: Proto Serialization Is Not Canonical",
      "url": "https://protobuf.dev/programming-guides/serialization-not-canonical/",
      "accessed": "2026-11-21"
    }
  ],
  "status": "unknown",
  "advantages": [],
  "limitations": [],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-21",
  "provenance": [
    "Primary-source synthesis, not a new native serializer experiment or a compatibility guarantee for every schema change.",
    "Schema retention and recovery acceptance are engineering implications of the documented encoding, presence and identity contracts."
  ]
}
