增加转为对象的能力

This commit is contained in:
zhangdeman committed 2023-10-11 17:20:03 +08:00
1 parent 160f464d15
commit 3432f85c3d
1 file changed
+13 -1
+13 -1
View File
@@ -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,
}
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.