You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
codec-protobuf: a protobuf JsonCodec sibling for byte[] systems (e.g. Kafka) #37
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.
Update: the SPI is now Codec (byte[] in/out) as of #35, so a protobuf codec implements it directly. Remaining open point: client-http must still pick a JSON codec, since the API speaks JSON. If a non-JSON codec can be on the classpath, Codec needs a way to say its format (e.g. a media type) so ServiceLoader discovery in client-http can filter.
Activity
core: JsonCodec is now Codec
dfa1 commentedon Oct 4, 2026
Update: the SPI is now
Codec(byte[] in/out) as of #35, so a protobuf codec implements it directly. Remaining open point:client-httpmust still pick a JSON codec, since the API speaks JSON. If a non-JSON codec can be on the classpath,Codecneeds a way to say its format (e.g. a media type) soServiceLoaderdiscovery inclient-httpcan filter.Split modules into model (core), codec, contract (client) and impleme…