+ try (FileInputStream jsonStream = new FileInputStream(path))
+ {
+ return readJson(jsonStream, type);
+ }
+ }
+
+ /**
+ * @param input The Stream is closed after being read
+ */
+ public static <T> T readJson(InputStream input, Class<T> type) throws IOException
+ {
+ try (InputStreamReader reader = new InputStreamReader(input); BufferedReader bf = new BufferedReader(reader))