From bdfba299b7407683da2f7751e2270c3f17a03770 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Mon, 29 May 2017 14:06:55 +0100 Subject: [PATCH] encode empty ps.Maps as nil every little helps --- report/map_helpers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/report/map_helpers.go b/report/map_helpers.go index f42978af4a..8ada366228 100644 --- a/report/map_helpers.go +++ b/report/map_helpers.go @@ -124,7 +124,7 @@ func mapRead(decoder *codec.Decoder, decodeValue func(isNil bool) interface{}) p // undocumented internal APIs apply. func mapWrite(m ps.Map, encoder *codec.Encoder, encodeValue func(*codec.Encoder, interface{})) { z, r := codec.GenHelperEncoder(encoder) - if m == nil { + if m == nil || m.IsNil() { r.EncodeNil() return }