Closed Ja7ad closed 9 months ago
We want support auto encoder and decoder json, gob and protobuf.
json
gob
protobuf
for example: https://github.com/nats-io/nats.go/tree/main/encoders/builtin
when create New() we register default encoder for auto encode and decode then base options we can customize to another encoder type.
New()
types.Delivery
Describe the problem you'd like to have solved
We want support auto encoder and decoder
json
,gob
andprotobuf
.for example: https://github.com/nats-io/nats.go/tree/main/encoders/builtin
Describe the ideal solution
when create
New()
we register default encoder for auto encode and decode then base options we can customize to another encoder type.types.Delivery
we have a unmarshaler interface to decode message body on specific value with any type.