我正在Android Studio中开发Android设备,我正在做一个需要构建列表的应用程序,并通过标准HTML调用从JSON中将数据传递给它。
有人可以为列表提供代码示例吗,或者甚至是一个示例项目,其中列表显示您下载的JSON数据?
我在谈论JSON:
http://api.geonames.org/citiesJSON?north=44.1&south=-9.9&east=-22.4&west=55.2&lang=de&username=demo
{
"geonames": [
{
"lng": -99.12766456604,
"geonameId": 3530597,
"countrycode": "MX",
"name": "Mexiko-Stadt",
"fclName": "city, village,...",
"toponymName": "Mexico City",
"fcodeName": "capital of a political entity",
"wikipedia": "en.wikipedia.org/wiki/Mexico_City",
"lat": 19.428472427036,
"fcl": "P",
"population": 12294193,
"fcode": "PPLC"
},
{
"lng": 116.397228240967,
"geonameId": 1816670,
"countrycode": "CN",
"name": "Peking",
"fclName": "city, village,...",
"toponymName": "Beijing",
"fcodeName": "capital of a political entity",
"wikipedia": "en.wikipedia.org/wiki/Beijing",
"lat": 39.9074977414405,
"fcl": "P",
"population": 11716620,
"fcode": "PPLC"
}
]
}