diff --git a/encoder.go b/encoder.go index 0a69058..b848d33 100644 --- a/encoder.go +++ b/encoder.go @@ -184,6 +184,9 @@ func (e *Encoder) fDumpArray(w map[string]interface{}, i interface{}, roots []st } v := reflect.ValueOf(i) + if v.Kind() == reflect.Ptr { + v = v.Elem() + } if e.ExtraFields.Len { nodeLen := append(roots, "__Len__")