improve MapDeep function for package gconv; improve gjson.New function for loading struct parameter

This commit is contained in:
John
2020-04-09 13:37:27 +08:00
parent 7fd53673ce
commit 23c2f12672
6 changed files with 144 additions and 27 deletions

View File

@ -74,7 +74,7 @@ func NewWithTag(data interface{}, tags string, safe ...bool) *Json {
i := interface{}(nil)
// Note that it uses Map function implementing the converting.
// Note that it here should not use MapDeep function if you really know what it means.
i = gconv.Map(data, tags)
i = gconv.MapDeep(data, tags)
j = &Json{
p: &i,
c: byte(gDEFAULT_SPLIT_CHAR),