diff --git a/any.go b/any.go index 925a7f5..5437815 100644 --- a/any.go +++ b/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, + } }