fix
This commit is contained in:
parent
a56574ff65
commit
b7890f7fd0
3
any.go
3
any.go
@ -110,7 +110,8 @@ func (at *AnyType) ToString() String {
|
||||
_ = serialize.JSON.Transition(at.data, &val)
|
||||
return String(ArrayType[any](val).ToString().Value)
|
||||
case consts.DataTypeMapAnyAny:
|
||||
return String(EasyMap(at.data).ToString())
|
||||
easyMap := EasyMap(at.data)
|
||||
return String(easyMap.ToString())
|
||||
case consts.DataTypeInt:
|
||||
return String(Int(at.data.(int64)).ToString().Value)
|
||||
case consts.DataTypeUint:
|
||||
|
10
map.go
10
map.go
@ -227,3 +227,13 @@ func (m *Map) MarshalJSON() ([]byte, error) {
|
||||
}
|
||||
return serialize.JSON.MarshalForByte(mapData)
|
||||
}
|
||||
|
||||
// ToString 序列化成字符串
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 14:24 2024/11/21
|
||||
func (m *Map) ToString() string {
|
||||
byteData, _ := m.MarshalJSON()
|
||||
return string(byteData)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user