Encode protobuf struct to bytes.
(pb proto.Message)
| 37 | |
| 38 | // Encode protobuf struct to bytes. |
| 39 | func (e JSONPBEncoder) Encode(pb proto.Message) ([]byte, error) { |
| 40 | return e.marshaler.Marshal(pb) |
| 41 | } |
| 42 | |
| 43 | // Decode bytes to protobuf struct. |
| 44 | func (e JSONPBEncoder) Decode(data []byte, pb proto.Message) error { |