public JSONArray readJsonFile() { BufferedReader br = null; JSONParser parser = new JSONParser(); JSONArray array = new JSONArray(); try { String sCurrentLine; br = getBufferedReaderForCompressedFile(jsonFilePath); // br = new BufferedReader(new FileReader(jsonFilePath)); while ((sCurrentLine = br.readLine()) != null) { // System.out.println("Record:\t" + sCurrentLine); Object obj; try { obj = parser.parse(sCurrentLine); JSONObject jsonObject = (JSONObject) obj; array.add(jsonObject); } catch (ParseException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } catch (IOException e) { e.printStackTrace(); } catch (CompressorException ex) { ex.printStackTrace(); } finally { try { if (br != null) br.close(); } catch (IOException ex) { ex.printStackTrace(); } } return array; }