有人无法帮我解析下面的回复,因为我做不到,非常感谢您的帮助!我已经检查了许多关于SO的链接,但是似乎没有任何帮助,或者由于我是新手而无法理解!
{
"status": "success",
"description": "Successfully Login",
"token": "xyxyxyxyxyxyxyxyxyxyxy",
"details": {
"userid": "",
"name": "",
"email": "",
"contact": "9888888886",
"usertype": "",
"parent_id": "",
"lender_id": "",
"firstlogin": "",
"assigned_sales_user": null,
"user_sub_type": "",
"status": "active",
"white_label_id": "",
"source": "",
"document": {
"0": {
"doc_id": "",
"user_id": "",
"doc_name": "",
"uploaded_doc_name": "",
"analysis_id": "",
"current_status": {
"status": "xyxyxyxyxy",
"file": ""
}
},
"1": {
"doc_id": "",
"user_id": "",
"doc_name": "",
"uploaded_doc_name": "",
"analysis_id": "",
"current_status": {
"status": "",
"file": ""
}
},
"2": {
"doc_id": "",
"user_id": "",
"doc_name": "",
"uploaded_doc_name": "",
"analysis_id": "",
"current_status": {
"status": "",
"file": ""
}
},
"3": {
"doc_id": "",
"user_id": "",
"doc_name": "",
"uploaded_doc_name": "",
"analysis_id": "",
"current_status": {
"status": "",
"file": ""
}
},
"4": {
"doc_id": "",
"user_id": "",
"doc_name": "",
"uploaded_doc_name": "",
"analysis_id": "",
"current_status": {
"status": "",
"file": ""
}
},
"5": {
"doc_id": "",
"user_id": "",
"doc_name": "",
"uploaded_doc_name": "",
"analysis_id": "",
"current_status": {
"status": "",
"file": ""
}
},
"6": {
"doc_id": "",
"user_id": "",
"doc_name": "",
"uploaded_doc_name": "",
"analysis_id": "",
"current_status": {
"status": "",
"file": ""
}
},
"7": {
"doc_id": "",
"user_id": "",
"doc_name": "",
"uploaded_doc_name": "",
"analysis_id": "",
"current_status": {
"status": "",
"file": ""
}
},
"8": {
"doc_id": "",
"user_id": "",
"doc_name": "",
"uploaded_doc_name": "",
"analysis_id": "",
"current_status": {
"status": "",
"file": ""
}
},
"9": {
"doc_id": "",
"user_id": "",
"doc_name": "",
"uploaded_doc_name": "",
"analysis_id": "",
"current_status": {
"status": "",
"file": ""
}
},
"total_records": ""
}
},
"DES_CODE": ""
}
以下是http://www.jsonschema2pojo.org/向我展示的那些令人发指,效率低下的内容
答案 0 :(得分:2)
那是因为json的结构有点愚蠢,只是使用列表的理解,所以应该使用map
所以会是这样
public class Details {
@SerializedName("document")
@Expose
private HashMap<Integer, DocumentModel>
//Some fileds
}
public class DocumentModel{
//Some fileds
}