// Create a new workbook Workbook workbook = new Workbook(); InputStream fileStream = this.getResourceStream("json/PivotTableViews.json"); workbook.fromJson(fileStream); // Create a ssjson file stream FileOutputStream outputStream = null; try { outputStream = new FileOutputStream("PivotTableViews.ssjson"); } catch (FileNotFoundException e) { e.printStackTrace(); } workbook.toJson(outputStream); // Close the ssjson stream try { outputStream.close(); } catch (IOException e) { e.printStackTrace(); }