【发布时间】:2018-02-18 16:14:07
【问题描述】:
我定义了这样的结构:
type json-input []struct {
Data string `json:"data"`
}
像
这样的 Unmarshal json 字符串[{"数据":"一些数据"}, {"数据":"一些数据"}]
data := &json-input{}
_ = json.Unmarshal([]byte(resp.Data), data)
我如何使用这个结构的对象来转换数据
【问题讨论】: