切换序列化库
This commit is contained in:
@ -10,7 +10,7 @@ package wrapper
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"git.zhangdeman.cn/zhangdeman/util"
|
||||
"git.zhangdeman.cn/zhangdeman/serialize"
|
||||
"reflect"
|
||||
)
|
||||
|
||||
@ -112,7 +112,7 @@ func (ot *ObjectType) ToMapStringAny() ObjectResult {
|
||||
if ot.IsNil() {
|
||||
return res
|
||||
}
|
||||
res.Err = util.JSON.UnmarshalWithNumber(ot.byteData, &res.Value)
|
||||
res.Err = serialize.JSON.UnmarshalWithNumber(ot.byteData, &res.Value)
|
||||
return res
|
||||
}
|
||||
|
||||
@ -128,7 +128,7 @@ func (ot *ObjectType) ToStruct(receiver interface{}) error {
|
||||
if ot.IsNil() {
|
||||
return errors.New("data is nil")
|
||||
}
|
||||
return util.JSON.UnmarshalWithNumber(ot.byteData, receiver)
|
||||
return serialize.JSON.UnmarshalWithNumber(ot.byteData, receiver)
|
||||
}
|
||||
|
||||
// ToStructIgnoreErr ...
|
||||
@ -143,5 +143,5 @@ func (ot *ObjectType) ToStructIgnoreErr(receiver interface{}) {
|
||||
if ot.IsNil() {
|
||||
return
|
||||
}
|
||||
_ = util.JSON.UnmarshalWithNumber(ot.byteData, receiver)
|
||||
_ = serialize.JSON.UnmarshalWithNumber(ot.byteData, receiver)
|
||||
}
|
||||
|
Reference in New Issue
Block a user