ObjectMapper objectMapper = new ObjectMapper();JsonNode chartValueJson = objectMapper.readTree(chartValue);// 获取dataset节点ArrayNode dataset = (ArrayNode) chartValueJson.path("dataset");// 找到source节点并替换它for (JsonNode node : dataset) {if (node.has("source")) {((com.fasterxml.jackson.databind.node.ObjectNode) node).set("source", objectMapper.valueToTree(lists));break;}}