public class JsonFileUtil extends Object
Constructor and Description |
---|
JsonFileUtil() |
Modifier and Type | Method and Description |
---|---|
static <T> com.alibaba.fastjson.JSONObject |
arrayToObjById(com.alibaba.fastjson.JSONArray array) |
static com.alibaba.fastjson.JSON |
readJson(String path)
读取json 文件,同步
|
static void |
saveJson(String path,
com.alibaba.fastjson.JSON json)
保存json 文件,同步
|
public static com.alibaba.fastjson.JSON readJson(String path) throws FileNotFoundException
path
- 路径FileNotFoundException
- 文件异常public static void saveJson(String path, com.alibaba.fastjson.JSON json)
path
- 路径json
- 新的json内容public static <T> com.alibaba.fastjson.JSONObject arrayToObjById(com.alibaba.fastjson.JSONArray array)
Copyright © 2017–2019. All rights reserved.