{"StudentID":61,"CourseID":45,"SubmitSchoolID":0,"SubmitSchoolCode":null,"SubmitTime":"\/Date(1357195709531)\/"}
这样的一个字符串 我想得到 String StudentID = "61" 这种效果 怎么遍历啊
String str="json的字符串,注意转义符";
ObjectMapper objectMapper = new ObjectMapper();
List<User> listuser=objectMapper.readValue(str, User.class);使用json-lib就可以了,json-lib依赖的jar包也要想要的存在
String json="你的json字符串";
JSONObject jsonObject=JSONObject.fromObject(json);
String StudentID=jsonObject.getString("StudentID");1