[英]How to get data from this type of JSON response using retrofit in Android
This is JSON response:这是 JSON 响应:
{
"0": {
"userId": "8888888888",
"Long": "77.28717",
"Lat": "28.63864",
"time": "14:14:47",
"date": "2020-12-19"
},
"1": {
"userId": "8888888888",
"Long": "77.28141",
"Lat": "28.63602",
"time": "14:10:05",
"date": "2020-12-19"
},
"2": {
"userId": "8888888888",
"Long": "77.28716",
"Lat": "28.63863",
"time": "14:09:40",
"date": "2020-12-19"
},
"status": "success"
}
here is a link for create pojo class for retrofit response.这是为 retrofit 响应创建 pojo class 的链接。 create here your class.在此处创建您的 class。
here is example for your class.这是您的 class 的示例。
Here is full example for calling API through retrofit. 这是通过 retrofit 调用 API 的完整示例。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.