有这么一个json,我想直接转成struct struct
type whatBean struct {
action string
control string
}
...............
tmp := "{\"这个key好多\":{\"action\":\"123\",\"control\":\"456\"},\"这个key真的好多所以用map\":{\"action\":\"/roamApi/getAuthStatus.action\",\"control\":\"https://sosona.com:8443\"}}"
var grid map[string]whatBean
json.Unmarshal([]byte(tmp), &grid)
fmt.Println(grid)
结果是这样的。。是不是哪里有错误。。刚开始用,大家帮忙
map[这个key好多:{ } 这个key真的好多所以用map:{ }]