ObjectMapper objectMapper = new ObjectMapper(); List<Cell>cells=new ArrayList(); //List转String String str= objectMapper.writeValueAsString(cells); //String转List List<Cell> cellList = objectMapper.readValue(str, new TypeReference<List<Cell>>() {});
pzw23 2021-03-04 17:12 原文
ObjectMapper objectMapper = new ObjectMapper(); List<Cell>cells=new ArrayList(); //List转String String str= objectMapper.writeValueAsString(cells); //String转List List<Cell> cellList = objectMapper.readValue(str, new TypeReference<List<Cell>>() {});