Compare commits

..

1 Commits
v3.10.5 ... v3

Author SHA1 Message Date
66d47cc824 add codec.RawMessage support
All checks were successful
test / test (push) Successful in 4m14s
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2024-12-23 20:53:47 +03:00

View File

@ -153,6 +153,10 @@ func (c *jsonpbCodecV2) Marshal(d []byte, v interface{}, opts ...codec.Option) (
}
}
return marshalOptions.MarshalAppend(d[:0], m)
case codec.RawMessage:
return []byte(m), nil
case *codec.RawMessage:
return []byte(*m), nil
default:
return nil, codec.ErrInvalidMessage
}