Jackson

List<Point> points = new ArrayList<Point>();
ObjectMapper objectMapper = new ObjectMapper(); JavaType javaType = objectMapper.getTypeFactory().constructParametrizedType(ArrayList.class, List.class, Point.class); List<Point> points = null; String itemsStr = recordT.getItems(); points = objectMapper.readValue(itemsStr, javaType); record.setItems(points);

 

你可能感兴趣的:(Jackson)