JsonCodec now speaks byte[] (#35), so a binary codec fits next to the JSON ones as a codec-protobuf module.
To decide
- Schema: a
.proto for the model. Content.Fields is an arbitrary JSON object (Map<String, Object>), so it needs google.protobuf.Struct/Value and a mapping both ways; Answer/Question map to oneof.
- SPI:
JsonCodec is named for JSON, and client-http must keep requiring JSON (the API speaks JSON). Either a protobuf codec stands alone (a ProtobufCodec class used directly, e.g. by a Kafka serializer), or the SPI splits into a generic Codec with JsonCodec as the subtype client-http asks for. Only worth splitting if something needs to be codec-agnostic.
- Who consumes it: a concrete producer/consumer should drive the schema before we freeze it.
🤖 Generated with Claude Code
JsonCodecnow speaksbyte[](#35), so a binary codec fits next to the JSON ones as acodec-protobufmodule.To decide
.protofor the model.Content.Fieldsis an arbitrary JSON object (Map<String, Object>), so it needsgoogle.protobuf.Struct/Valueand a mapping both ways;Answer/Questionmap tooneof.JsonCodecis named for JSON, andclient-httpmust keep requiring JSON (the API speaks JSON). Either a protobuf codec stands alone (aProtobufCodecclass used directly, e.g. by a Kafka serializer), or the SPI splits into a genericCodecwithJsonCodecas the subtypeclient-httpasks for. Only worth splitting if something needs to be codec-agnostic.🤖 Generated with Claude Code