package cn.teammodel;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import java.io.File;
import java.io.IOException;

/**
 * @author winter
 * @create 2024-01-03 16:21
 */
@SpringBootTest
public class Scripts {


    @Test
    public void genDocFromJson() throws IOException {
        String path = "C://Users/Administrator/Desktop/data.json";
        ObjectMapper objectMapper = new ObjectMapper();
        JsonNode root = objectMapper.readTree(new File(path));
        System.out.println(root.get("content"));

    }
}
