-1
{
"meta": {
"type": "RESPONSE",
"application": "",
"data0": {
some data
},
"lv1": [
{
"status": "SUCCESS",
"response-type": "JSON",
"message": {},
"response": {
"more_data": "TRUE",
"no_result": "5",
"current_page": "1",
"data": [[
"1",
"2",
"3"]]
}
}
]
}
}
type response struct {
META struct {
LV []struct {
RESPONSE struct {
Data []struct {
array []struct {
val []string
}
} `json:"data"`
} `json:"response"`
} `json:"lv1"`
} `json:"meta"`
}
我怎样才能在下面的值是多少?GO解析嵌套的JSON数组
"data": [[
"1",
"2",
"3"]]
我试过接口和结构。在接口类型[1 2 3]
中使用接口结果,我不确定如何获取值。当使用结构,我试图映射阵列的与错误消息数组时遇到了问题:
“不能解组阵列分成型结构的围棋结构字段。数据{ 瓦尔斯[]串}”
您发布的JSON在某处无效... – RayfenWindspear