Package org.cakelab.json.format
Class JSONFormatterPrettyprint
- java.lang.Object
-
- org.cakelab.json.format.JSONFormatterBase<org.cakelab.json.format.JSONFormatterPrettyprint.IndentingPrintStream>
-
- org.cakelab.json.format.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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.cakelab.json.format.JSONFormatterBase
JSONFormatterBase.IgnoringNullIterator
-
-
Field Summary
-
Fields inherited from class org.cakelab.json.format.JSONFormatterBase
cfg, ENTRY_COMPARATOR
-
-
Constructor Summary
Constructors Constructor Description JSONFormatterPrettyprint(JSONFormatterConfiguration format)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
append(org.cakelab.json.format.JSONFormatterPrettyprint.IndentingPrintStream pout, JSONArray jsonArray)
protected void
append(org.cakelab.json.format.JSONFormatterPrettyprint.IndentingPrintStream pout, JSONObject jsonObject)
protected org.cakelab.json.format.JSONFormatterPrettyprint.IndentingPrintStream
setupPrintStream(java.io.OutputStream out, boolean autoflush, java.lang.String charset)
called to setup a new PrintStream instance.-
Methods inherited from class org.cakelab.json.format.JSONFormatterBase
appendAny, appendNewLine, appendPrimitiveValue, appendUnicodeCharacter, appendUnicodeString, exceedsEncodingRange, format, format, format, format, format, format, format, format, getConfiguration, iterator
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.cakelab.json.format.JSONFormatter
format, format, format, format, format, format, format, format, getConfiguration
-
-
-
-
Constructor Detail
-
JSONFormatterPrettyprint
public JSONFormatterPrettyprint(JSONFormatterConfiguration format) throws JSONException
- Throws:
JSONException
-
-
Method Detail
-
append
protected void append(org.cakelab.json.format.JSONFormatterPrettyprint.IndentingPrintStream pout, JSONArray jsonArray) throws JSONException
- Specified by:
append
in classJSONFormatterBase<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 classJSONFormatterBase<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 classJSONFormatterBase<org.cakelab.json.format.JSONFormatterPrettyprint.IndentingPrintStream>
- Throws:
java.io.UnsupportedEncodingException
-
-