public class StreamJsonSerializer extends java.lang.Object implements JsonStructureCallback
| Modifier and Type | Field and Description |
|---|---|
private com.fasterxml.jackson.core.JsonGenerator |
gen
Jackson json generator
|
private static CentralLogger |
LOG
Logger
|
| Constructor and Description |
|---|
StreamJsonSerializer(java.io.OutputStream out,
com.fasterxml.jackson.core.JsonEncoding encoding,
boolean pretty)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
booleanValue(boolean value)
Called when json boolean value is encountered.
|
void |
closeStream()
Close the stream.
|
void |
endArray()
Called when json array end is encountered.
|
void |
endObject()
Called when json object end is encountered.
|
void |
fieldName(java.lang.String name)
Called when json field is encountered.
|
void |
nullValue()
Called when json null value is encountered.
|
void |
numberValue(java.lang.Number value)
Called when json number value is encountered.
|
void |
rawDecimalValue(java.lang.String value)
Called when json raw decimal value is encountered.
|
void |
startArray()
Called when json array start is encountered.
|
void |
startObject()
Called when json object start is encountered.
|
void |
stringValue(java.lang.String value)
Called when json string value is encountered.
|
private static final CentralLogger LOG
private com.fasterxml.jackson.core.JsonGenerator gen
public StreamJsonSerializer(java.io.OutputStream out,
com.fasterxml.jackson.core.JsonEncoding encoding,
boolean pretty)
throws java.io.IOException
out - Output stream.encoding - Character encoding.pretty - Pretty print flag.java.io.IOException - when IO error occurs.public void closeStream()
throws java.io.IOException
java.io.IOException - when IO error occurs.public void startObject()
startObject in interface JsonStructureCallbackpublic void endObject()
endObject in interface JsonStructureCallbackpublic void startArray()
startArray in interface JsonStructureCallbackpublic void endArray()
endArray in interface JsonStructureCallbackpublic void fieldName(java.lang.String name)
fieldName in interface JsonStructureCallbackname - Field name.public void booleanValue(boolean value)
booleanValue in interface JsonStructureCallbackvalue - The value.public void stringValue(java.lang.String value)
stringValue in interface JsonStructureCallbackvalue - The value.public void numberValue(java.lang.Number value)
numberValue in interface JsonStructureCallbackvalue - The value.public void nullValue()
nullValue in interface JsonStructureCallbackpublic void rawDecimalValue(java.lang.String value)
rawDecimalValue in interface JsonStructureCallbackvalue - The value.