make proto.Message compatible with raw json
This commit is contained in:
parent
fd16cd298f
commit
1134ea5ff3
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user