public interface JSONStringFormatter
extends java.lang.CharSequence
Modifier and Type | Method and Description |
---|---|
java.lang.StringBuffer |
append(char c)
Append a character to the underlying buffer without conversion.
|
java.lang.StringBuffer |
append(java.lang.Object o)
This method simply calls the
Object.toString() method and appends the
result to the string buffer. |
java.lang.StringBuffer |
append(java.lang.String string)
Append a string to the underlying buffer without conversion.
|
void |
appendIndent()
Marks the beginning of a new line.
|
void |
appendNewLine()
Marks end of a line.
|
void |
appendUnicodeString(java.lang.String string)
This method is called whenever a string value is serialized.
|
JSONStringFormatter |
create(JSONStringFormatterConfiguration format)
This is a factory method, called whenever a new formatter is requested.
|
void |
indentDec()
Decrement indent (e.g.
|
void |
indentInc()
Increment indent (e.g.
|
java.util.Iterator<java.util.Map.Entry<java.lang.String,java.lang.Object>> |
iterator(java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> entrySet)
This method is called whenever a JSONObject is serialised.
|
JSONStringFormatter create(JSONStringFormatterConfiguration format)
format
- Configuration for the new formatterorg.cakelab.json.JSONCodec#getDefaultStringFormatter()
void indentInc()
void indentDec()
void appendIndent()
void appendNewLine()
java.util.Iterator<java.util.Map.Entry<java.lang.String,java.lang.Object>> iterator(java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> entrySet)
entrySet
- java.lang.StringBuffer append(java.lang.String string)
java.lang.StringBuffer append(char c)
java.lang.StringBuffer append(java.lang.Object o)
Object.toString()
method and appends the
result to the string buffer.o
- void appendUnicodeString(java.lang.String string)
org.cakelab.json.codec.JSONCodecConfiguration#formatterUnicodeValues
is set.string
-