-
-
-
-
"github.com/bitly/go-simplejson"
-
-
-
-
-
-
-
-
-
-
"email":
"piaoyunsoft@163.com",
-
-
-
-
-
-
-
-
"email":
"aaaaaa@163.com",
-
-
-
-
-
-
-
-
"email":
"bbbbbb@163.com",
-
-
-
-
-
-
-
-
-
-
js, err := simplejson.
NewJson([]byte(jsonStr))
-
-
-
-
-
-
personArr, err := js.
Get(
"person").
Array()
-
fmt.
Println(len(personArr))
-
-
-
for i,
_ := range personArr {
-
-
person := js.
Get(
"person").
GetIndex(i)
-
name := person.
Get(
"name").
MustString()
-
age := person.
Get(
"age").
MustInt()
-
email := person.
Get(
"email").
MustString()
-
-
fmt.
Printf(
"name=%s, age=%d, email=%s\n", name, age, email)
-
-
-
phoneNumArr,
_ := person.
Get(
"phoneNum").
Array()
-
for ii, vv := range phoneNumArr {
-
-
-
-
-
-
http://www.dllhook.com/post/183.html