From 13245dc365b0de3547c9845087941f04817e7936 Mon Sep 17 00:00:00 2001 From: Charles Banning Date: Wed, 17 Feb 2021 09:38:47 -0700 Subject: [PATCH] issue #89 --- xml.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xml.go b/xml.go index 8689a41..e26eb48 100644 --- a/xml.go +++ b/xml.go @@ -1012,6 +1012,8 @@ func marshalMapToXmlIndent(doIndent bool, b *bytes.Buffer, key string, value int case map[string]interface{}, []byte, string, float64, bool, int, int32, int64, float32, json.Number: case []map[string]interface{}, []string, []float64, []bool, []int, []int32, []int64, []float32, []json.Number: case []interface{}: + case nil: + value = "" default: // see if value is a struct, if so marshal using encoding/xml package if reflect.ValueOf(value).Kind() == reflect.Struct {