3
我有一个JSON对象,这样的事情:解组JSON与未知的字段名称
{
"randomstring": {
"everything": "here",
"is": "known"
}
}
基本上是所有里面的randomstring
对象是已知的,我可以模拟,但randomstring本身是随机的。我知道它会怎样,但每次都会有所不同。基本上我需要的所有数据都是在randomstring对象中。我怎么能解析这种JSON来获取数据?
解组成'图[字符串] SomeParticularStructType'。 – twotwotwo
http://stackoverflow.com/questions/35558039/how-to-unmarshal-json-with-dynamic-key-which-cant-be-captured-as-a-json-in-st和http: //stackoverflow.com/questions/15817720/golang-struct-for-json-with-arbitrary-keys –