diff --git a/hasaki-gen-crud/template.go b/hasaki-gen-crud/template.go index fcf2bef..70eadd7 100644 --- a/hasaki-gen-crud/template.go +++ b/hasaki-gen-crud/template.go @@ -1,7 +1,6 @@ package main import ( - "encoding/json" "fmt" "reflect" "time" @@ -192,8 +191,7 @@ func (TempLowHead3A60 *Temp3A60) fixSqlRowMap(fieldType map[string]reflect.Kind, case reflect.String: raw[i] = cast.ToString(raw[i]) case reflect.Slice, reflect.Array, reflect.Map, reflect.Struct, reflect.Ptr: - tmp, _ := json.Marshal(raw[i]) - raw[i] = gjson.ParseBytes(tmp).Value() + raw[i] = gjson.Parse(cast.ToString(raw[i])).Value() //todo default: raw[i] = cast.ToString(raw[i]) }