Package org.cakelab.json.format
Class JSONFormatterCompact
- java.lang.Object
-
- org.cakelab.json.format.JSONFormatterBase<java.io.PrintStream>
-
- org.cakelab.json.format.JSONFormatterCompact
-
- All Implemented Interfaces:
JSONFormatter
public class JSONFormatterCompact extends JSONFormatterBase<java.io.PrintStream> implements JSONFormatter
Formatter which outputs the most compact string representation
-
-
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 JSONFormatterCompact(JSONFormatterConfiguration cfg)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
append(java.io.PrintStream pout, JSONArray jsonArray)
protected void
append(java.io.PrintStream pout, JSONObject jsonObject)
protected java.io.PrintStream
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
-
JSONFormatterCompact
public JSONFormatterCompact(JSONFormatterConfiguration cfg) throws JSONException
- Throws:
JSONException
-
-
Method Detail
-
append
protected void append(java.io.PrintStream pout, JSONArray jsonArray) throws JSONException
- Specified by:
append
in classJSONFormatterBase<java.io.PrintStream>
- Throws:
JSONException
-
append
protected void append(java.io.PrintStream pout, JSONObject jsonObject) throws JSONException
- Specified by:
append
in classJSONFormatterBase<java.io.PrintStream>
- Throws:
JSONException
-
setupPrintStream
protected java.io.PrintStream 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<java.io.PrintStream>
- Throws:
java.io.UnsupportedEncodingException
-
-