Skip to content

codec-protobuf: a protobuf JsonCodec sibling for byte[] systems (e.g. Kafka) #37

Description

@dfa1

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions