package com.zkqy.system.test;

import com.alibaba.fastjson2.JSON;

import java.io.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.TypeReference;

import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * @author hanzihang
 * @date 2024/4/12 5:29 PM
 */
public class LJJ2 {
    public static void main(String[] args) {
        // JSON文件的绝对路径
//        for (int i = 0;i< 10;i++){
//            StringBuffer sd = new StringBuffer();
//            sd.append("asd"+i);
//            System.out.println(sd);
//        }


        String jsonFilePath = "/Users/zrwj/Desktop/ZKQY_LJJ/Intelligent_manufacturing/drag_form/C:/log/qwe3.json";

        try (BufferedReader bufferedReader = new BufferedReader(new FileReader(jsonFilePath))) {
            StringBuilder sb = new StringBuilder();
            String line;
            while ((line = bufferedReader.readLine()) != null) {
                sb.append(line).append("\n");
            }
            String jsonString = sb.toString();

            // 解析JSON字符串为List<Map<String, Object>>类型
            List<Map<String, Object>> dataList = JSON.parseObject(jsonString, new TypeReference<List<Map<String, Object>>>() {});


        } catch (IOException e) {
            e.printStackTrace();
        }
        // Map<String, Object> map = new HashMap<>();
        // map.put("asd", "qwe");
        // map.keySet().forEach(item -> {
        // System.out.println(item);
        // });
    }
}
