public class GenericJsonSerializer
extends com.endeca.infront.util.serial.GenericSerializer
| Modifier and Type | Class and Description |
|---|---|
protected static class |
GenericJsonSerializer.PropertyCounter |
| Modifier and Type | Field and Description |
|---|---|
protected Stack<GenericJsonSerializer.PropertyCounter> |
itemStack |
| Constructor and Description |
|---|
GenericJsonSerializer(Writer writer)
Constructor.
|
GenericJsonSerializer(Writer writer,
int maxDepth)
Constructor.
|
GenericJsonSerializer(Writer pWriter,
int pMaxDepth,
boolean pDetectCycles)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
closeInternalNode() |
protected void |
closeItem()
Visit the end of an item.
|
protected void |
closeList()
Visit the end of a list.
|
protected void |
openElement(int elementCount)
Visit the start of a list element definition.
|
protected void |
openInternalNode() |
protected void |
openItem(Map<String,String> attributes)
Visit the start of an item.
|
protected void |
openList()
Visit the start of a list.
|
protected void |
openProperty(String name)
Visit the start of a property definition.
|
protected void |
visitBoolean(Boolean bool)
Visit a Boolean value.
|
protected void |
visitDouble(Double num)
Visit a double value.
|
protected void |
visitInteger(Integer num)
Visit an integer value.
|
protected void |
visitLong(Long num)
Visit an integer value.
|
protected void |
visitNull()
Visit a null value.
|
protected void |
visitString(String str)
Visit a string value.
|
protected void |
writeSeparator(int count) |
checkAndIncrementDepth, checkAndIncrementDepth, closeElement, closeProperty, decrementDepth, decrementDepth, handleArray, handleByteArray, handleDefault, handleEndecaNode, handleList, handleMap, overrideDepthCheck, serialize, traverseMap, writeprotected Stack<GenericJsonSerializer.PropertyCounter> itemStack
public GenericJsonSerializer(Writer writer)
writer - the character output streampublic GenericJsonSerializer(Writer writer, int maxDepth)
writer - the character output streammaxDepth - the maximum depth at which to serialize objects.public GenericJsonSerializer(Writer pWriter, int pMaxDepth, boolean pDetectCycles)
writer - the character output streammaxDepth - the maximum depth at which to serialize objects.detectCycles - if true, throw an error when a cycle is found.protected void visitNull()
throws IOException
com.endeca.infront.util.serial.GenericSerializervisitNull in class com.endeca.infront.util.serial.GenericSerializerIOExceptionprotected void visitString(String str) throws IOException
com.endeca.infront.util.serial.GenericSerializervisitString in class com.endeca.infront.util.serial.GenericSerializerstr - the stringIOExceptionprotected void visitInteger(Integer num) throws IOException
com.endeca.infront.util.serial.GenericSerializervisitInteger in class com.endeca.infront.util.serial.GenericSerializernum - the numberIOExceptionprotected void visitDouble(Double num) throws IOException
com.endeca.infront.util.serial.GenericSerializervisitDouble in class com.endeca.infront.util.serial.GenericSerializernum - the numberIOExceptionprotected void visitLong(Long num) throws IOException
com.endeca.infront.util.serial.GenericSerializervisitLong in class com.endeca.infront.util.serial.GenericSerializernum - the numberIOExceptionprotected void visitBoolean(Boolean bool) throws IOException
com.endeca.infront.util.serial.GenericSerializervisitBoolean in class com.endeca.infront.util.serial.GenericSerializerbool - the booleanIOExceptionprotected void openItem(Map<String,String> attributes) throws IOException
com.endeca.infront.util.serial.GenericSerializeropenItem in class com.endeca.infront.util.serial.GenericSerializerattributes - an optional map of attribute name to attribute valueIOExceptionprotected void closeItem()
throws IOException
com.endeca.infront.util.serial.GenericSerializercloseItem in class com.endeca.infront.util.serial.GenericSerializerIOExceptionprotected void openProperty(String name) throws IOException
com.endeca.infront.util.serial.GenericSerializeropenProperty in class com.endeca.infront.util.serial.GenericSerializername - the name of the propertyIOExceptionprotected void openElement(int elementCount)
throws IOException
com.endeca.infront.util.serial.GenericSerializeropenElement in class com.endeca.infront.util.serial.GenericSerializerelementCount - the number of elements that have precededIOExceptionprotected void openInternalNode()
throws IOException
openInternalNode in class com.endeca.infront.util.serial.GenericSerializerIOExceptionprotected void closeInternalNode()
throws IOException
closeInternalNode in class com.endeca.infront.util.serial.GenericSerializerIOExceptionprotected void openList()
throws IOException
com.endeca.infront.util.serial.GenericSerializeropenList in class com.endeca.infront.util.serial.GenericSerializerIOExceptionprotected void closeList()
throws IOException
com.endeca.infront.util.serial.GenericSerializercloseList in class com.endeca.infront.util.serial.GenericSerializerIOExceptionprotected void writeSeparator(int count)
throws IOException
IOExceptionCopyright © 2015, Oracle and/or its affiliates. All rights reserved.