我有这样的 JSON:
{
"shops": [
{
"id": "831",
"name": "18 and East",
"categories": [
"1",
"12",
"13"
],
"locations": [
{
"lat": "53.403297",
"lng": "-2.978689",
"address": "Bold Street Liverpoool, L1 4EA"
},
{
"lat": "51.590111",
"lng": "-0.146134",
"address": "58 Fortis Green Road, London, N10 3HN"
},
{
"lat": "53.406738",
"lng": "-2.981188",
"address": "137-139 Market Square Liverpool"
}
],
"image": "5574-18-and-East-sale.jpg"
}
....
我有 Shop.java、Response.java 和 Locations.java 像这样(这个文件将数据作为对象获取):
现在我想将地址解析为以下文件,我尝试了几种方法,但我无法解析数组中的地址。而且我能够解析 id、name 和 image。
有人可以帮我解决这个问题吗?