goavro icon indicating copy to clipboard operation
goavro copied to clipboard

Supporting Custom Codecs

Open marcoserrato opened this issue 1 year ago • 1 comments

Hello!

I'm fairly new to the Go ecosystem and was curious whether supporting custom codecs would potentially be on the roadmap for this project.

In my particular case, I have a custom type which wraps a fixed type and requires additional encoding/decoding steps. More specifically, my type has an additional layer of compression which needs to be handled during textual serialization. In Ruby, I can use a library such as Avromatic to define custom encoding/decoding steps for a custom type I might be registering.

Perhaps there's some Go pattern I'm unaware of that would allow me to do this, but for now I've landed on just forking the project and augmenting the default symbol table to include my custom type with its own codec. However, I'd like to avoid maintaining a fork of this project longterm, and ideally define my custom logic in the project that includes goavro.

I've searched through a few issues, and If I'm not misunderstanding, this issue seems to resonate with my problem, in that support for custom textual encoders/decoders would helpful. However, given the timeline, I'm not entirely sure whether it's still being pursued.

marcoserrato avatar Sep 27 '24 17:09 marcoserrato

Hey @marcoserrato I think we're certainly up for this change, but it will require a major version bump. If anyone is interested in contributing a fix for https://github.com/linkedin/goavro/issues/253, please chime in on that issue.

rockwotj avatar Jan 20 '25 04:01 rockwotj