使用fastjson
@Test
public void testdsa() throws IOException {
/*JSONArray jsonArray = new JSONArray();
JSONObject jsonObject = new JSONObject();
jsonObject.put("1", "222");
JSONObject jsonObject2 = new JSONObject();
jsonObject2.put("1111", "44444");
jsonArray.add(jsonObject);
jsonArray.add(jsonObject2);*/
BufferedInputStream bis = null;
StringBuilder sb = new StringBuilder();
byte[] b = new byte[1024 * 1024];
try {
bis = new BufferedInputStream(new FileInputStream(new File("a - 副本.txt")));
int len = -1;
while ((len = bis.read(b)) != -1) {
sb.append(new String(b, 0, len));
}
System.out.println("jie");
} catch (Exception e) {
e.printStackTrace();
} finally {