-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Description
{
"a": -1231.323,
"b": {
"z": 31,
"p": true,
"123": "key是字符串"
}
}下面哪种转换比较合理呢......
type RootObject struct {
A float64 `json:"a"`
B map[string]interface{} `json:"b"`
}type RootObject struct {
A float64 `json:"a"`
B B `json:"b"`
}
type B struct {
Z int `json:"z"`
P bool `json:"p"`
NumberField string `json:"123"`
}