public final class Serializer
extends java.lang.Object
Constructor and Description |
---|
Serializer(Writer writer) |
Modifier and Type | Method and Description |
---|---|
void |
addToIndent(int amount)
Increment (or decrement if negative) the prevailing indent by the specified amount.
|
void |
flush() |
void |
write(java.lang.String s) |
void |
writeHexDigit(int hexDigit) |
void |
writeIndent()
Append spaces for the current indent.
|
void |
writeJsonArray(JsonArray array)
Append a JSON array.
|
void |
writeJsonObject(JsonObject jsonObject)
Write a JSON object.
|
void |
writeString(java.lang.String string) |
void |
writeUnicodeEscape(char c) |
void |
writeValue(java.lang.Object obj) |
public Serializer(Writer writer)
public void writeValue(java.lang.Object obj)
public void writeJsonObject(JsonObject jsonObject)
jsonObject
- object to appendpublic void writeJsonArray(JsonArray array)
array
- array to appendpublic void writeIndent()
public void writeString(java.lang.String string)
public void writeUnicodeEscape(char c)
public void writeHexDigit(int hexDigit)
public void write(java.lang.String s)
public void flush()
public void addToIndent(int amount)
amount
- amount to change indent