GSON:当密钥是响应的一部分时解析JSON

时间:2018-06-11 08:55:16

标签: json gson android

这是我要解析的回复。

{"table":"PypersonResponsibleCrewMembersWklyView","numberOfRemainingRecords":0,"rowDefinition":{"attrNames":["EmpOraseq","{PEmpNo","PEmpName","Code","Name","EmpNo","EmpTrdCode","EmpTrdName","EmpFirstName","EmpLastName","NhHrsTot","OtHrsTot","DotHrsTot","NhHrs1","OtHrs1","DotHrs1","NhHrs2","OtHrs2","DotHrs2","NhHrs3","OtHrs3","DotHrs3","NhHrs4","OtHrs4","DotHrs4","NhHrs5","OtHrs5","DotHrs5","NhHrs6","OtHrs6","DotHrs6","NhHrs7","OtHrs7","DotHrs7"]},"rows":[{"attrValues":[211448,"1016","Mr. Demo","REL","aman","1004","PRES","President","Gord","Rawlins",0.5,0.5,0,0.5,0.5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"attrValues":[211448,"1016","Mr. Demo","REL","aman","ESS001","PROE","Project Engineer","Nadal","Rafael",0.5,0.5,0.5,0.5,0.5,0.5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"attrValues":[211448,"1016","Mr. Demo","REL","aman","CL1001","SS01","System Specialist","Ronald","Bromell",0.5,0.5,0.5,0.5,0.5,0.5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}]}

在此回复' attrNames'包含密钥和' attrValues'包含值。是否可以使用GSON解析它?

0 个答案:

没有答案