android 如何解析如下json?
[{"stuId":"111","birthDate":"1999-08-08 00:00:00.0","stuName":"132123"},{"stuId":"112","birthDate":"1988-08-08 00:00:00.0","stuName":"111"}]
[{"stuId":"111","birthDate":"1999-08-08 00:00:00.0","stuName":"132123"},{"stuId":"112","birthDate":"1988-08-08 00:00:00.0","stuName":"111"}]
解决方案 »
- Android SDK中ActivityCreator.bat怎么找不到了?
- android中如何让软键盘弹出时只覆盖到光标下面
- 传递list问题
- android 左右滑动,求指点,求源码。
- 不小心把R.java删除了,怎么样再自动生成出来
- 学 Android 有钱途吗?
- 求救!怎样在linux下编译android 请详细说一下流程 谢谢
- 想在后台service中监听到长按back键的动作?有没有人知道如何实现?100分
- ANDROID SDK创建项目,gradle编译项目一直失败,请高手赐教!!!
- udp组播
- android开发求解...有没有android开发神啊..
- android拖动videoview进行视频交换的问题
String json_ = "[{'stuId':'111','birthDate':'1999-08-08 00:00:00.0','stuName':'132123'},{'stuId':'112','birthDate':'1988-08-08 00:00:00.0','stuName':'111'}]";
private void parseJson(String json){
try {
JSONArray array = new JSONArray(json);
for(int i=0;i<array.length();i++){
JSONObject jsonObject = new JSONObject(array.getString(i));
Log.i(TAG, "jsonObject.get('stuId') is:"+jsonObject.get("stuId"));
Log.i(TAG, "jsonObject.get('birthDate') is:"+jsonObject.get("birthDate"));
Log.i(TAG, "jsonObject.get('stuName') is:"+jsonObject.get("stuName"));
}
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}