How to parse JSON arrays with two different data types into a struct in Golang
问题 I have JSON that looks like this: { "a": [ [ "12.58861425", 10.52046452 ], [ "12.58861426", 4.1073 ] ] "b": [ [ "12.58861425", 10.52046452 ], [ "12.58861426", 4.1073 ] ] "c": "true" "d": 1234 } I want to unmarshall this into a struct I created: type OrderBook struct { A [][2]float32 `json:"a"` B [][2]float32 `json:"b"` C string `json:"c"` D uint32 `json:"d"` } //Note this won't work because the JSON array contains a string and a float value pair rather than only floats. Normally I would then