List of usage examples for android.util JsonWriter setIndent
public void setIndent(String indent)
From source file:com.fuzz.android.limelight.util.JSONTool.java
/** * Entry point writer method that starts the call of other writer methods. * * @param outputStream//from www. j ava 2 s .com * @param book * @throws IOException */ public static void writeJSON(OutputStream outputStream, Book book) throws IOException { JsonWriter writer = new JsonWriter(new OutputStreamWriter(outputStream, "UTF-8")); writer.setIndent(" "); writeBook(writer, book); writer.close(); }
From source file:at.ac.tuwien.caa.docscan.logic.DataLog.java
private void writeJsonStream(OutputStream out, ArrayList<ShotLog> shotLogs) throws IOException { JsonWriter writer = new JsonWriter(new OutputStreamWriter(out, "UTF-8")); writer.setIndent(" "); writeList(writer, shotLogs);// ww w. jav a 2 s. c om writer.close(); }