import java.io.InputStream;
public static String Red_json(String url) {
String rsString = "";
InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(url);
Scanner scanner = new Scanner(is);
while (scanner.hasNextLine()) {
rsString+=scanner.nextLine();
//System.out.println(scanner.nextLine());
}
return rsString;
}
```
原文:https://www.cnblogs.com/userzf/p/13060483.html