Class JSONFormatterPrettyprint

  • All Implemented Interfaces:
    JSONFormatter

    public class JSONFormatterPrettyprint
    extends JSONFormatterBase<org.cakelab.json.format.JSONFormatterPrettyprint.IndentingPrintStream>
    implements JSONFormatter
    Formatter which creates pretty printed string output
    • Method Detail

      • append

        protected void append​(org.cakelab.json.format.JSONFormatterPrettyprint.IndentingPrintStream pout,
                              JSONArray jsonArray)
                       throws JSONException
        Specified by:
        append in class JSONFormatterBase<org.cakelab.json.format.JSONFormatterPrettyprint.IndentingPrintStream>
        Throws:
        JSONException
      • append

        protected void append​(org.cakelab.json.format.JSONFormatterPrettyprint.IndentingPrintStream pout,
                              JSONObject jsonObject)
                       throws JSONException
        Specified by:
        append in class JSONFormatterBase<org.cakelab.json.format.JSONFormatterPrettyprint.IndentingPrintStream>
        Throws:
        JSONException
      • setupPrintStream

        protected org.cakelab.json.format.JSONFormatterPrettyprint.IndentingPrintStream setupPrintStream​(java.io.OutputStream out,
                                                                                                         boolean autoflush,
                                                                                                         java.lang.String charset)
                                                                                                  throws java.io.UnsupportedEncodingException
        Description copied from class: JSONFormatterBase
        called to setup a new PrintStream instance.
        Specified by:
        setupPrintStream in class JSONFormatterBase<org.cakelab.json.format.JSONFormatterPrettyprint.IndentingPrintStream>
        Throws:
        java.io.UnsupportedEncodingException