|
BeanIO 2.0.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.beanio.stream.json.JsonWriterSupport
public abstract class JsonWriterSupport
Base class for writing a JSON formatted stream.
The init(Writer, JsonParserConfiguration)
method must be invoked before
any writeXXX method.
JsonRecordParserFactory
Method Summary | |
---|---|
protected int |
getIndent()
|
protected String |
getLineSeparator()
|
protected void |
init(Writer out,
JsonParserConfiguration config)
Initializes this object. |
protected boolean |
isPretty()
|
protected void |
write(Map<String,Object> map)
Writes a Map in JSON object format. |
protected void |
writeArray(Iterable<Object> iterable)
Writes an Iterable in JSON array format. |
protected void |
writeString(String text)
Writes a String in JSON string format. |
protected void |
writeValue(Object value)
Writes a value in JSON format. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
protected void init(Writer out, JsonParserConfiguration config)
out
- the Writer
to write toconfig
- the JsonParserConfiguration
protected void write(Map<String,Object> map) throws IOException
Map
in JSON object format.
map
- the Map to write
IOException
protected void writeValue(Object value) throws IOException
Object.toString()
is called and the value is formatted as a JSON string.
value
- the Object to write
IOException
protected void writeString(String text) throws IOException
String
in JSON string format.
text
- the String
to write
IOException
protected void writeArray(Iterable<Object> iterable) throws IOException
Iterable
in JSON array format.
iterable
- the Iterable
to write
IOException
protected boolean isPretty()
protected int getIndent()
protected String getLineSeparator()
|
BeanIO 2.0.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |