From 0801419415fceec360f7df06e16f3da1fcd93e4f Mon Sep 17 00:00:00 2001 From: hoteas Date: Mon, 30 Oct 2017 09:54:54 +0000 Subject: [PATCH] --- trunk/src/go.hoteas.com/hotime/objtoobj.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/trunk/src/go.hoteas.com/hotime/objtoobj.go b/trunk/src/go.hoteas.com/hotime/objtoobj.go index 2673e5a..d19aca7 100644 --- a/trunk/src/go.hoteas.com/hotime/objtoobj.go +++ b/trunk/src/go.hoteas.com/hotime/objtoobj.go @@ -238,6 +238,22 @@ func ObjToStr(obj interface{}) string { return str } +//转换为Map +func StrToMap(string string) Map { + data := Map{} + data.JsonToMap(string) + + return data +} + +//转换为Slice +func StrToSlice(string string) Slice { + data := Slice{} + data.JsonToSlice(string) + + return data +} + //字符串数组: a1,a2,a3转["a1","a2","a3"] func StrArrayToJsonStr(a string) string {