Jackson反序列化泛型List
ObjectMapper mapper = new ObjectMapper(); String json = "[{\"name\":\"a\",\"password\":\"345\"},{\"name\":\"b\",\"password\":\"123\"}]"; //第一种方法 List<User> list = mapper.readValue(json, new TypeReference<List<User>>(){/**/}); //第二种方法 JavaType javaType = mapper.getTypeFactory().constructCollectionType(List.class, User.class); List<User> list2 = mapper.readValue(json, javaType);