This commit is contained in:
hoteas 2017-11-06 16:38:03 +00:00
parent e99c726e26
commit ba1cf9fff1
4 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,3 @@
<component name="CopyrightManager">
<settings default="" />
</component>

10
.idea/goLibraries.xml Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GoLibraries">
<option name="urls">
<list>
<option value="file://$PROJECT_DIR$/../../.." />
</list>
</option>
</component>
</project>

View File

@ -0,0 +1,8 @@
<component name="libraryTable">
<library name="Go SDK">
<CLASSES>
<root url="file://D:/app/go/src" />
</CLASSES>
<SOURCES />
</library>
</component>

View File

@ -21,6 +21,13 @@ func ObjToMap(obj interface{}, e ...*Error) Map {
v = obj.(Map) v = obj.(Map)
case map[string]interface{}: case map[string]interface{}:
v = obj.(map[string]interface{}) v = obj.(map[string]interface{})
case string:
v = Map{}
e := json.Unmarshal([]byte(obj.(string)), &v)
if e != nil {
err = errors.New("没有合适的转换对象!" + e.Error())
v = nil
}
default: default:
data, err := json.Marshal(obj) data, err := json.Marshal(obj)
if err != nil { if err != nil {