我有一串json[{"id":1},{"id":2}....] 试图定义为struct
type A struct {
Nodes []Node `json:"node"`
}
type Node struct {
Id string `json:"id"`
}
可是无法转化 请问 这struct应该如何定义
我有一串json[{"id":1},{"id":2}....] 试图定义为struct
type A struct {
Nodes []Node `json:"node"`
}
type Node struct {
Id string `json:"id"`
}
可是无法转化 请问 这struct应该如何定义