From f28b10737265a6f898d21119af55c1f7a011a713 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Thu, 1 Jul 2021 23:23:01 +0300 Subject: [PATCH] broker: fix RawMessage marshal Signed-off-by: Vasiliy Tolstov --- broker/broker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/broker/broker.go b/broker/broker.go index 9b5a2430..fc1bde6a 100644 --- a/broker/broker.go +++ b/broker/broker.go @@ -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 }