broker: fix RawMessage marshal

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2021-07-01 23:23:01 +03:00
parent c592fabe2a
commit f28b107372

View File

@ -42,7 +42,7 @@ type RawMessage []byte
// MarshalJSON returns m as the JSON encoding of m.
func (m *RawMessage) MarshalJSON() ([]byte, error) {
if m == nil {
return nil, nil
return []byte("null"), nil
}
return *m, nil
}