标签:bit date inpu ring imp input hub type tle
import (
"fmt"
"time"
"github.com/astaxie/beego"
"github.com/bitly/go-simplejson"
)
type Datas struct {
data struct {
Id int64 `json:"id"`
Userid string `json:"userid"`
Title string `json:"title"`
Txt string `json:"txt"`
Date time.Time `json:"date"`
} `json:"data"`
}
json, _ := simplejson.NewJson(this.Ctx.Input.RequestBody)
datas, _ := json.Get("data").Array()
for _, v := range datas {
fmt.Println(v)
temp, _ := v.(map[string]interface{})
fmt.Println(temp["id"])
}
标签:bit date inpu ring imp input hub type tle
原文地址:http://www.cnblogs.com/kekemuyu/p/7198517.html