JAVA 如何解析这条JSON数据 求代码

{"res":"01","info":[{"id":"0","man":""},{"id":"1","name":"woman"},{"id":"2","name":" group"}]}
在后台打印出来

try {
JSONObject obj=new JSONObject(s);
JSONArray arr=obj.getJSONArray("info");
for(int i=0;i<arr.length();i++){
JSONObject subObj=arr.getJSONObject(i);
String id=subObj.getString("id");
String name=subObj.getString("name");
System.out.println("id="+id+",name="+name);
}
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}