public final class JsonNodeSerializer extends JsonSerializer
JsonDirectConverter
and JsonAttsConverter
class.atomic, form, map, sep
itemsep, out, sopts
Constructor and Description |
---|
JsonNodeSerializer(PrintOutput out,
SerializerOptions opts)
Constructor.
|
JsonNodeSerializer(PrintOutput out,
SerializerOptions opts,
AdaptiveSerializer adaptive)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
attribute(byte[] name,
byte[] value,
boolean standalone)
Serializes an attribute.
|
protected void |
finishClose()
Closes an element.
|
protected void |
finishEmpty()
Closes an empty element.
|
protected void |
finishOpen()
Finishes an opening element node.
|
protected void |
node(ANode node)
Serializes the specified node.
|
protected void |
startOpen(byte[] name)
Starts an element.
|
protected void |
text(byte[] value,
FTPos ftp)
Serializes a text.
|
atomic, close, encode, function, serialize, string
norm, printChar, printChars, reset
finished, indent, itemsep, newline
closeDoc, closeElement, comment, get, get, ignore, namespace, nsUri, openDoc, openElement, pi
public JsonNodeSerializer(PrintOutput out, SerializerOptions opts, AdaptiveSerializer adaptive) throws IOException
out
- print outputopts
- serialization parametersadaptive
- adaptive serializer (can be null
)IOException
- I/O exceptionpublic JsonNodeSerializer(PrintOutput out, SerializerOptions opts) throws IOException
out
- print outputopts
- serialization parametersIOException
- I/O exceptionprotected void node(ANode node) throws IOException
Serializer
node
in class StandardSerializer
node
- node to be serializedIOException
- I/O exceptionprotected void startOpen(byte[] name) throws IOException
Serializer
startOpen
in class Serializer
name
- element nameIOException
- I/O exceptionprotected void attribute(byte[] name, byte[] value, boolean standalone) throws IOException
Serializer
attribute
in class Serializer
name
- namevalue
- valuestandalone
- standalone flagIOException
- I/O exceptionprotected void finishOpen() throws IOException
Serializer
finishOpen
in class Serializer
IOException
- I/O exceptionprotected void text(byte[] value, FTPos ftp) throws IOException
Serializer
text
in class Serializer
value
- valueftp
- full-text positions, used for visualization highlightingIOException
- I/O exceptionprotected void finishEmpty() throws IOException
Serializer
finishEmpty
in class Serializer
IOException
- I/O exceptionprotected void finishClose() throws IOException
Serializer
finishClose
in class Serializer
IOException
- I/O exceptionCopyright © 2005–2015 BaseX Team. All rights reserved.