From 94a11ff2e8c2e8000f1bd3efc42c839079e5d3ad 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 3d6bc7a057..080914490a 100644 --- a/report/map_helpers.go +++ b/report/map_helpers.go @@ -125,7 +125,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 }