fix seriasize
This commit is contained in:
2
map.go
2
map.go
@ -39,7 +39,7 @@ func EasyMapWithError(mapData any) (Map, error) {
|
||||
reflectType := reflect.TypeOf(mapData)
|
||||
if reflectType.Kind() != reflect.Map {
|
||||
mapFormatData := make(map[string]any)
|
||||
if err := serialize.JSON.UnmarshalWithNumber(serialize.JSON.MarshalForByte(mapData), &mapFormatData); nil != err {
|
||||
if err := serialize.JSON.UnmarshalWithNumber(serialize.JSON.MarshalForByteIgnoreError(mapData), &mapFormatData); nil != err {
|
||||
return m, errors.New("input data type is " + reflectType.String() + ", can not convert to map")
|
||||
}
|
||||
mapData = mapFormatData
|
||||
|
Reference in New Issue
Block a user