首页 > 解决方案 > 使用 volley 和 json 未提供的图像解析 json

问题描述

以下是我的 APi 回复

我想使用此 api 中未提供的标志图像获取所有详细信息,我该怎么做?请帮助我,我正在制作大学项目

"matches": [
{
"unique_id": 1144995,
"date": "2018-12-25T00:00:00.000Z",
"dateTimeGMT": "2018-12-25T23:30:00.000Z",
"team-1": "Australia",
"team-2": "India",
"type": "Test",
"squad": true,
"toss_winner_team": "India",
"winner_team": "India",
"matchStarted": true
},
{
"unique_id": 1153839,
"date": "2018-12-25T00:00:00.000Z",
"dateTimeGMT": "2018-12-25T22:00:00.000Z",
"team-1": "New Zealand",
"team-2": "Sri Lanka",
"type": "Test",
"squad": true,
"toss_winner_team": "Sri Lanka",
"winner_team": "New Zealand",
"matchStarted": true
},
{
"unique_id": 1144153,
"team-2": "Pakistan",
"team-1": "South Africa",
"type": "Test",
"date": "2018-12-26T00:00:00.000Z",
"dateTimeGMT": "2018-12-26T08:00:00.000Z",
"squad": true,
"toss_winner_team": "Pakistan",
"winner_team": "South Africa",
"matchStarted": true
}]

标签: androidandroid-volley

解决方案


如果您想从国家/地区名称中获取国家/地区图像,则可以使用此 api 并将flag_base64键用作国家/地区标志网址。

https://raw.githubusercontent.com/samayo/country-json/master/src/country-by-flag.json


推荐阅读