This commit is contained in:
邹宗楠
2022-12-30 15:00:44 +08:00
parent 3fa1e69892
commit b2edd80ed4
8 changed files with 6 additions and 65 deletions

View File

@@ -44,7 +44,6 @@ func TryUnmarshalUseNumber(data []byte, result interface{}) error {
// 这个函数将解析json返回的map中的字段类型与structObj中的完全一样的
func Unmarshal2Map(data []byte, structObj interface{}) (resultMap map[string]interface{}, err error) {
globals.SugarLogger.Debugf("进入Unmarshal2Map")
if err = json.Unmarshal(data, structObj); err == nil {
if err = json.Unmarshal(data, &resultMap); err == nil {
m := Struct2MapByJson(structObj)