正如您所看到的,由以下字符串映射的数组包含一个 JSON 对象,其属性的值可能又是 JSON 对象的数组。
将其解析为 JSON 对象数组(对于层次结构中的所有元素)的简单方法是什么?
[{"address_components":
[{"long_name":"China","short_name":"CN","types" ["country","political"]}],
"formatted_address":"Volksrepublik China",
"geometry":{
"bounds":{
"$":{"b":18.1535216,"d":53.56097399999999},
"fa":{"b":73.49941360000003,"d":134.77280989999997}
},
"location": {"jb":35.86166,"kb":104.19539699999996},
"location_type":"APPROXIMATE",
"viewport":{
"$":{"b":18.1535216,"d":53.56097399999999},
"fa":{"b":73.49941360000003,"d":134.77280989999997}
}
},
"types":["country","political"]
}]