@Override public JSONPrintSession printQuoted(String value) { return print(JSONObject.quote(value)); }
/** * Prints the JSONObject to the write (compactly or not). * * @param writer * to write content to * @param compact * if true, then write compactly, if false, write with pretty printing * @since 5.2.1 */ public void print(PrintWriter writer, boolean compact) { JSONPrintSession session = compact ? new CompactSession(writer) : new PrettyPrintSession(writer); print(session); }
/** * Prints the JSONObject to the write (compactly or not). * * @param writer * to write content to * @param compact * if true, then write compactly, if false, write with pretty printing * @since 5.2.1 */ public void print(PrintWriter writer, boolean compact) { JSONPrintSession session = compact ? new CompactSession(writer) : new PrettyPrintSession(writer); print(session); }
@Override public JSONPrintSession printQuoted(String value) { return print(JSONObject.quote(value)); }