Android 解析 嵌套的JsonArray 这个具体该怎么解析呢?

[{"secondId":"29","lessonpId":"20","secondTitle":"教学录像","record":[{"secondId":"29","t... [
{"secondId":"29","lessonpId":"20","secondTitle":"教学录像",
"record":[{"secondId":"29","threeTitle":"教学录像","threeId":"83"}]
},

{"secondId":"30","lessonpId":"20","secondTitle":"电子教案",
"record":[{"secondId":"30","threeTitle":"第一章","threeId":"59"},
{"secondId":"30","threeTitle":"第二章","threeId":"60"},
{"secondId":"30","threeTitle":"第三章","threeId":"61"},
{"secondId":"30","threeTitle":"第四章","threeId":"62"},
{"secondId":"30","threeTitle":"第五章","threeId":"63"},
{"secondId":"30","threeTitle":"第六章","threeId":"64"}]
},

{"secondId":"31","lessonpId":"20","secondTitle":"多媒体课件",
"record":[{"secondId":"31","threeTitle":"第一章","threeId":"65"},
{"secondId":"31","threeTitle":"第二章","threeId":"66"},
{"secondId":"31","threeTitle":"第三章","threeId":"67"},
{"secondId":"31","threeTitle":"第四章","threeId":"68"},
{"secondId":"31","threeTitle":"第五章","threeId":"69"},
{"secondId":"31","threeTitle":"第六章","threeId":"70"}]
},

{"secondId":"32","lessonpId":"20","secondTitle":"网页课程",
"record":[{"secondId":"32","threeTitle":"课程负责人","threeId":"36"},
{"secondId":"32","threeTitle":"主讲老师","threeId":"37"},
{"secondId":"32","threeTitle":"自我评价","threeId":"38"},
{"secondId":"32","threeTitle":"课程建设规划","threeId":"39"},
{"secondId":"32","threeTitle":"课程录像","threeId":"41"},
{"secondId":"32","threeTitle":"精品课程申报表","threeId":"42"},
{"secondId":"32","threeTitle":"学校政策措施","threeId":"95"}]
},

{"secondId":"53","lessonpId":"20","secondTitle":"教学大纲",
"record":[{"secondId":"53","threeTitle":"教学内容及目标要求","threeId":"54"},
{"secondId":"53","threeTitle":"学时安排与教材","threeId":"55"},
{"secondId":"53","threeTitle":"重点难点及解决方法","threeId":"56"},
{"secondId":"53","threeTitle":"实习安排","threeId":"57"},
{"secondId":"53","threeTitle":"考核方式","threeId":"58"}]
}
]
展开
 我来答
liuhen1001
2014-10-24 · 超过15用户采纳过TA的回答
知道答主
回答量:41
采纳率:0%
帮助的人:31.9万
展开全部
String json = "";
try {
JSONArray arr = new JSONArray(json);
for (int i=0; i<arr.length(); i++) {
JSONObject obj = arr.getJSONObject(i);
String secondId = obj.getString("secondId");
String lessonpId = obj.getString("lessonpId");
String secondTitle = obj.getString("secondTitle");
JSONArray recordArr = obj.getJSONArray("record");
for (int j=0; j<recordArr.length(); j++) {
JSONObject recordObj = recordArr.getJSONObject(j);
// String secondId2 = recordObj.getString("secondId");
String threeTitle = recordObj.getString("threeTitle");
String threeId = recordObj.getString("threeId");
}
}
} catch (JSONException e) {
e.printStackTrace();
}
山之去4011
2014-10-24 · TA获得超过396个赞
知道答主
回答量:170
采纳率:0%
帮助的人:87.8万
展开全部
完全可以,用activityGroup
追问
能不能说的再详细一些?
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
840129536
2014-10-24 · TA获得超过220个赞
知道小有建树答主
回答量:302
采纳率:100%
帮助的人:220万
展开全部
用 fastjson
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
兰兰老师爱中国
2014-10-24 · 知道合伙人教育行家
兰兰老师爱中国
知道合伙人教育行家
采纳数:23343 获赞数:49015
1975年9月毕业东北电力大学1978年9月牡丹江电力技术学校讲师,1991年6月大连金州热电有限公司高级工程师。

向TA提问 私信TA
展开全部
答-还是您自己算吧对您今后有好处的。
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 1条折叠回答
收起 更多回答(2)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式