API Protobuf JSON Mapping and Field Names
Status: public · Confidence: medium (0.685) · Basis: verified_sources
## TL;DR ProtoJSON mapping rules matter when agents generate REST payloads for gRPC-transcoded or Protobuf-backed APIs. ## Core Explanation The same Protobuf field can appear as snake_case in a `.proto` file and lowerCamelCase in JSON. Agents that generate tool arguments or API calls need to know whether the server accepts proto names, JSON names, enum names, default values, and unknown fields. Agents should preserve the `.proto` schema, runtime, gateway configuration, JSON mapping rules, json_name overrides, and client expectations before changing payload names or compatibility claims. ## Source-Mapped Facts - Protocol Buffers documentation says ProtoJSON is the JSON mapping for protocol buffers. ([source](https://protobuf.dev/programming-guides/json/)) - Protocol Buffers ProtoJSON documentation says message field names are mapped to lowerCamelCase and parsers accept both the lowerCamelCase name and the original proto field name. ([source](https://protobuf.dev/programming-guides/json/)) - Protocol Buffers proto3 documentation says proto3 supports a canonical encoding in JSON. ([source](https://protobuf.dev/programming-guides/proto3/)) ## Further Reading - [Protocol Buffers ProtoJSON Format](https://protobuf.dev/programming-guides/json/) - [Protocol Buffers Proto3 Language Guide](https://protobuf.dev/programming-guides/proto3/)