增加转为对象的能力
This commit is contained in:
parent
160f464d15
commit
3432f85c3d
14
any.go
14
any.go
@ -96,5 +96,17 @@ func (at *AnyType) ToString() String {
|
||||
case DataTypePtr:
|
||||
return String(serialize.JSON.MarshalForString(at.data))
|
||||
}
|
||||
return ""
|
||||
return String("")
|
||||
}
|
||||
|
||||
// ToObject 任意类型转为对象
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 17:19 2023/10/11
|
||||
func (at *AnyType) ToObject() MapResult {
|
||||
return MapResult{
|
||||
Value: EasyMapFromString(at.ToString().Value()),
|
||||
Err: nil,
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user