我已經有了一個任務來製作數據饋送應用程序,並且我已經提供了示例JSON數據。這是確切的問題陳述。Android中的Web API
問題陳述
開發Android應用作爲進料,以顯示附加數據。 要求
1)。使用Web API獲取數據(PFA,樣本數據)。 2)。使用Recycler視圖列出項目。
這是他們給了我
[
{
"type":"CONTENT",
"title":"",
"data":{
"name":"Jhon",
"profile_img_url":"https://lh3.googleusercontent.com/-NBa3Y9qqiS4/AAAAAAAAAAI/AAAAAAAABtA/z18p98Ny--Q/s36-p-k-rw-no/photo.jpg",
"question":"What are the next numbers in this series: 2.5, 4, 7, 10,16,19??",
"posted_on":"1481263449"
}
},
{
"type":"HORIZONTAL_IMAGE_LIST",
"title":"Suggested for you",
"data":[
{
"card_img_url":"https://lh3.googleusercontent.com/-vZkSLb7rJlA/AAAAAAAAAAI/AAAAAAAAACQ/9XEOfxXIMUo/w320-h180-p-rw/photo.jpg",
"title":"Recruitment Essentials",
"followers":"10000"
},
{
"card_img_url":"https://lh3.googleusercontent.com/-vZkSLb7rJlA/AAAAAAAAAAI/AAAAAAAAACQ/9XEOfxXIMUo/w320-h180-p-rw/photo.jpg",
"title":"Speed Maths",
"followers":"10000"
},
{
"card_img_url":"https://lh3.googleusercontent.com/-vZkSLb7rJlA/AAAAAAAAAAI/AAAAAAAAACQ/9XEOfxXIMUo/w320-h180-p-rw/photo.jpg",
"title":"Test",
"followers":"12000"
}
]
},
{
"type":"CONTENT",
"title":"",
"data":{
"name":"Sandeep",
"profile_img_url":"https://lh3.googleusercontent.com/-kPeVZhvqjNE/AAAAAAAAAAI/AAAAAAAAADs/60B5PdpPF64/s36-p-k-rw-no/photo.jpg",
"question":"What are the next numbers in this series: 2.5, 4, 7, 10,16,19??",
"posted_on":"1481233449"
}
},
{
"type":"IMAGE",
"title":"",
"data":{
"img_url":"https://lh3.googleusercontent.com/-kPeVZhvqjNE/AAAAAAAAAAI/AAAAAAAAADs/60B5PdpPF64/s36-p-k-rw-no/photo.jpg"
}
}
]
基本上我不理解第一個要求行的含義任何人都可以解釋它
閱讀此:https://www.w3schools.com/js/js_json_arrays.asp –
你是什麼意思的「第一線」?你的意思是開放'['的JSON? – CommonsWare
第一條要求行 – Vikas