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"}]
解决方案 »
- LocationManager.GPS_ENABLED_CHANGE_ACTION 监听不到
- Launcher修改问题请教
- Android模拟器 插拔卡命令
- Android真机如何加载驱动?
- ANR 问题,请教大家~
- context.getAssets().list("")方法的问题
- 有没有能集成ADT的eclipse,或者告诉我下哪个版本的eclipse安装ADT不会出问题
- 我想自己开发个计算器
- 调用系统相机,“保存”那个步骤我能不能跳过而直接保存
- android系统有没接口可以采集到屏幕的点亮时长?
- 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();
}
}