//json字符串,轉換JSONObject
JSONObject jsonobject = JSONObject.fromObject(jsonStr);
//json對象轉成javaBean
YourBean entity = (YourBean) JSONObject.toBean(jsonobject, YourBean.class);
//json字符串,轉換JSONArray
JSONArray info = JSONArray.fromObject(listStr);
//JSONArray轉JavaBean集合
List<YourBeanList> infoList = (List<YourBeanList>) JSONArray.toCollection(info, YourBeanList.class);