make proto.Message compatible with raw json

This commit is contained in:
Asim Aslam 2020-04-14 16:59:24 +01:00
parent fd16cd298f
commit 1134ea5ff3

View File

@ -4,6 +4,15 @@ type Message struct {
Data []byte
}
func (m Message) MarshalJSON() ([]byte, error) {
return m.Data, nil
}
func (m *Message) UnmarshalJSON(data []byte) error {
m.Data = data
return nil
}
func (m *Message) ProtoMessage() {}
func (m *Message) Reset() {