type A struct {
Value string `json:"value"`
Key int `json:"key"`
Name string `json:"name"`
Text interface{} `json:"text"`
Type int `json:"type"`
}
type B struct {
Value string `json:"value"`
Data []A `json:"data"`
}
type Data []struct {
Value string `json:"value"`
Key string `json:"key"`
Name string `json:"name"`
Text string `json:"text"`
Type string `json:"type"`}
json数据解析到b,注意具体的其他数据自己填
在这个网站直接复制json生产结构体 mholt.github.io/json-to-go/
@Breezess 这个工具好,万分感谢
博客:Go 快速入门指南 - JSON