[
{
"version":1,
"materialName":"Zirconia",
"materialCode":"ZIRCONIA"
}
]
package com.lezu.springboot.test;
import cn.hutool.core.io.file.FileReader;
import com.alibaba.fastjson.JSONArray;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.test.context.SpringBootTest;
/**
* @author lianJiaYu
* @date 2024/7/05
*/
@SpringBootTest
@Slf4j
public class LianTest {
public static void main(String[] args) throws Exception {
JSONArray jsonArray = JSONArray.parseArray(new FileReader("C:\\Users\\jiayu.lian\\Desktop\\test.json").readString());
System.out.println(jsonArray);
}