Glossary · Protocols and standards

ProtoJSON

Protocol Buffers' canonical JSON encoding. A2A v1.0 uses it for all JSON: camelCase field names, enum names as strings, oneof members as keys.

ProtoJSON is the canonical JSON encoding of Protocol Buffers messages, and A2A v1.0 adopts it as the normative way to write its data model as JSON in every JSON-based binding.

Rules that shape A2A payloads.

  • Field names become lowerCamelCase: context_id in the proto is contextId in JSON. Parsers also accept the original snake_case name.
  • Enums are written as the value’s name, so a task state is "TASK_STATE_COMPLETED" and a role is "ROLE_USER". Parsers also accept the integer.
  • Oneof fields appear as whichever member is set, so the key identifies the type. That is why a v1.0 text part is an object with a text key and no kind field.
  • Bytes become standard base64 strings, as in a part’s raw field.
  • Timestamps become RFC 3339 strings. A2A narrows this to UTC with a Z suffix and recommends millisecond precision.
  • Struct and Value hold arbitrary JSON, which is how metadata and data parts carry free-form content.
  • Defaults of fields without presence are omitted, and serializers should not emit null.

A message in ProtoJSON, illustrative:

{
  "messageId": "0c4f1f7e-6a1b-4d2c-9d61-1f3b2a9e7c55",
  "role": "ROLE_USER",
  "parts": [{"text": "Where is order PO-5518?"}],
  "metadata": {"channel": "procurement"}
}

Why A2A chose it. ADR-001, accepted by the A2A Technical Steering Committee on 18 November 2025, picked ProtoJSON over writing custom transformation rules into the specification. The ADR lists the costs: a breaking change to enum casing, since v0.3 used lowercase strings such as completed, and no round-tripping of unknown fields.

A practical catch. ProtoJSON parsers reject unknown fields by default. Section 5.7 of the A2A specification says implementations should ignore unrecognized fields for forward compatibility. An A2A implementation built on a stock ProtoJSON parser therefore needs its ignore-unknown-fields option switched on.

Neighbouring terms. gRPC carries the same messages in binary protobuf. The JSON-RPC and HTTP+JSON bindings carry them as ProtoJSON.

Sources

  1. ProtoJSON Format (Protocol Buffers documentation) (accessed )
  2. A2A ADR-001: Leverage ProtoJSON Specification for JSON Serialization (accessed )
  3. A2A Protocol Specification, section 5.5: JSON Field Naming Convention (accessed )
  4. A2A Protocol Specification, section 5.6.1: Timestamps (accessed )
  5. A2A Protocol Specification, section 5.7: Field Presence and Optionality (accessed )