String data = "{json}";ObjectMapper objectMapper = new ObjectMapper();JsonNode rootNode = null;try {rootNode = objectMapper.readTree(data); //通过将String类型的json数据转化为JsonNode对象} catch (JsonProcessingException e) {throw new RuntimeException(e);}JsonNode dataNode = rootNode.get("data");//通过get方法实现对所需信息的提取JsonNode returnData = dataNode.get(0);//获取第一个数据System.out.println("returnData:" + returnData);// 遍历数组元素if (dataNode.isArray()) {for (int i = 0; i < dataNode.size(); i++) {JsonNode arrayElement = dataNode.get(i);returnData = arrayElement;System.out.println("数组元素:" + arrayElement);}}