50,528
社区成员
发帖
与我相关
我的任务
分享
public static Object getObject4JsonString(String jsonString, Class pojoCalss) {
Object pojo;
JSONObject jsonObject = JSONObject.fromObject(jsonString);
//System.out.println("jsonObject:\n"+jsonObject);
pojo = JSONObject.toBean(jsonObject, pojoCalss);
System.out.println("对象转换结束!");
return pojo;
}