当响应在android中有两个或更多数组时,如何捕获JSON响应

时间:2017-10-11 06:59:55

标签: android arrays json

这是我的JSON数据格式

[{"member":[{"id":"1","name":"A V S Murthy (Sanjeev)","mobile1":"9845072215","mail_id":"alampalli.murthy@gmail.com","bg":"O +Ve"},{"id":"67","name":"Sundaramurthy N C","mobile1":"9845026300\t","mail_id":"ncsmurthy1943@gmail.com","bg":"O +Ve"}]},{"anne":[{"id":"1","name":"A V S Murthy (Sanjeev)","mobile1":"9845072215","mail_id":"alampalli.murthy@gmail.com","bg":"O +Ve","anne_name":"Shoba A Murthy","anne_mobile":"","anne_email":""}]},{"annets":[]}]

1 个答案:

答案 0 :(得分:0)

首先访问http://www.jsonschema2pojo.org/并创建模型类。 (或手动创建) 用于https://github.com/google/gson库进行解析