测试0001 2016-02-22 02:39 采纳率: 66.7%
浏览 2465
已采纳

Android这样的JSON数据应该怎么解析。

图片说明

这是一个选择添加疾病的页面。
第一行是疾病类型
第二行是疾病名称
要求上面的疾病类型和疾病名称都要从服务器获取。
每种疾病类型下面的疾病名称数量不确定

还有可以点击选择添加日期,不过这个问题我已经解决了。
我采用的是ListView展示的。但是解析过后有问题,只能解析到疾病类型,解析不到疾病名称。

每个疾病类型和疾病名称都有ID。
这是用网页访问JSP网址的返回值。
{"code":200,"message":"调用成功","data":{"mem_message_records":[{"message_disease_typeid":"1","message_disease_type":"心血管系统"},{"message_disease_typeid":"2","message_disease_type":"外围血管疾病"},{"message_disease_typeid":"3","message_disease_type":"脑血管疾病"},{"message_disease_typeid":"4","message_disease_type":"肺部疾病"},{"message_disease_typeid":"5","message_disease_type":"代谢疾病"},{"message_disease_typeid":"6","message_disease_type":"周围神经疾病"},{"message_disease_typeid":"7","message_disease_type":"其他疾病"}],"mem_message_recordss":[[{"message_diseaseid":"1","message_disease":"冠状动脉疾病"},{"message_diseaseid":"2","message_disease":"心绞痛"},{"message_diseaseid":"3","message_disease":"心肌梗死"},{"message_diseaseid":"4","message_disease":"冠状动脉血运重建"},{"message_diseaseid":"5","message_disease":"充血性心力衰竭"}],[{"message_diseaseid":"6","message_disease":"闭塞性周围动脉粥样硬化"},{"message_diseaseid":"7","message_disease":"血栓行静脉炎"}],[{"message_diseaseid":"8","message_disease":"脑血栓"},{"message_diseaseid":"9","message_disease":"短暂性脑供血不足"},{"message_diseaseid":"10","message_disease":"脑出血"}],[{"message_diseaseid":"11","message_disease":"慢性支气管炎"},{"message_diseaseid":"12","message_disease":"慢性阻塞性肺病"},{"message_diseaseid":"13","message_disease":"支气管哮喘"},{"message_diseaseid":"14","message_disease":"间质性肺病"},{"message_diseaseid":"15","message_disease":"囊性肺纤维化"}],[{"message_diseaseid":"16","message_disease":"1型糖尿病"},{"message_diseaseid":"17","message_disease":"2型糖尿病"},{"message_diseaseid":"18","message_disease":"糖尿病肾病"}],[{"message_diseaseid":"19","message_disease":"糖尿病性周围精神病"},{"message_diseaseid":"20","message_disease":"自主神经性病变"}],[{"message_diseaseid":"21","message_disease":"高血压"},{"message_diseaseid":"22","message_disease":"视网膜病变"},{"message_diseaseid":"23","message_disease":"恶性肿瘤"},{"message_diseaseid":"24","message_disease":"脑卒中"},{"message_diseaseid":"25","message_disease":"重性精神疾病"},{"message_diseaseid":"26","message_disease":"结核病"},{"message_diseaseid":"27","message_disease":"肝炎"},{"message_diseaseid":"28","message_disease":"先天畸形"},{"message_diseaseid":"29","message_disease":"其它"}]]}}

  • 写回答

11条回答

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥15 请问这个脚本bat清除tmp文件,会导致硬盘文件损坏吗?(操作系统-windows)
      • ¥15 IncredBuild报错
      • ¥15 锂电池偏最小二乘法参数辩识
      • ¥20 有偿求 matlab解GP方程程序
      • ¥15 session失效问题
      • ¥15 GMS地下水数值模拟无法打开
      • ¥15 树型结构的数据怎么匹配分支
      • ¥15 stm32F4用.引不出来结构体成员怎么解决
      • ¥30 Syntax Error: TypeError: this.getOptions is not a function的问题
      • ¥15 eclipse Android环境搭建