1.准备json文件
2.编写java代码
String jsonStr=null;
try {
File file = new File("C:\\Users\\TAO\\Desktop\\ss.json");
FileReader fileReader = new FileReader(file);
Reader reader = new InputStreamReader(new FileInputStream(file), "Utf-8");
int ch = 0;
StringBuffer sb = new StringBuffer();
while ((ch = reader.read()) != -1) {
sb.append((char) ch);
}
fileReader.close();
reader.close();
jsonStr = sb.toString();
}catch (Exception e){
}
String SessionVOs = jsonStr;
com.alibaba.fastjson.JSONObject ss = com.alibaba.fastjson.JSONObject.parseObject(SessionVOs);
搞定!