【Java】JSON字符串转换为实体类对象时间:2024-10-21 13:27:55String userString = "{"id":1,"name":"xiaoming"}"; JSONObject userJson = JSONObject.parseObject(userString); User user = JSON.toJavaObject(userJson,User.class);