Documentation ¶
Index ¶
- func GetJsonInt64(dJson interface{}, keys ...interface{}) (int64, error)
- func GetJsonInt64Force(dJson interface{}, keys ...interface{}) (int64, error)
- func GetJsonInterface(dJson interface{}, keys ...interface{}) (interface{}, error)
- func GetJsonString(dJson interface{}, keys ...interface{}) (string, error)
- func JsonDecode(jsonStr string) (interface{}, error)
- func JsonEncode(maps interface{}) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetJsonInt64 ¶
JSON格式相关获取函数3: 获取一个节点int64格式 fmt.Println(getJsonInterface(J, "def", "bbb", 3, "errorcode"))
func GetJsonInt64Force ¶
JSON格式相关获取函数4: 获取一个节点int64格式,如果是字符串数字,则转换成int64后返回
func GetJsonInterface ¶
func GetJsonInterface(dJson interface{}, keys ...interface{}) (interface{}, error)
JSON格式相关获取函数1: 获取一个节点内容
func GetJsonString ¶
JSON格式相关获取函数2: 获取一个节点string格式
func JsonDecode ¶
*------------------------- // 名称:获取将字符参数转换为map的参数 // @jsonStr=`{"ip": "127.0.0.1", "device": "ABESSF0023"}` // @jsonStr=`[{"ip": "127.0.0.1", "device": "ABESSF0023"}]` ***-----------------------
func JsonEncode ¶
*------------------------- // 名称:map参数转换为字符串 // @maps={"ip": "127.0.0.1", "device": "ABESSF0023"} // @maps=[{"ip": "127.0.0.1", "device": "ABESSF0023"}] ***-----------------------
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.