public abstract class JsonSerializer extends StandardSerializer
atomic, form, map, sep
itemsep, out, sopts
Modifier and Type | Method and Description |
---|---|
protected void |
atomic(Item item)
Serializes an atomic value.
|
void |
close()
Closes the serializer.
|
protected void |
encode(int cp)
Encodes the specified codepoint before printing it.
|
void |
function(FItem item)
Serializes a function item.
|
void |
serialize(Item item)
Serializes the specified item, which may be a node or an atomic value.
|
protected void |
string(byte[] string)
Serializes a JSON string.
|
node, norm, printChar, printChars, reset
finished, indent, itemsep, newline
attribute, closeDoc, closeElement, comment, finishClose, finishEmpty, finishOpen, get, get, ignore, namespace, nsUri, openDoc, openElement, pi, startOpen, text
public void serialize(Item item) throws IOException
Serializer
serialize
in class StandardSerializer
item
- item to be serializedIOException
- I/O exceptionpublic void function(FItem item) throws IOException
Serializer
function
in class StandardSerializer
item
- itemIOException
- I/O exceptionprotected void atomic(Item item) throws IOException
Serializer
atomic
in class StandardSerializer
item
- itemIOException
- I/O exceptionprotected final void string(byte[] string) throws IOException
string
- stringIOException
- I/O exceptionprotected final void encode(int cp) throws IOException
StandardSerializer
encode
in class StandardSerializer
cp
- codepoint to be encoded and printedIOException
- I/O exceptionpublic void close() throws IOException
Serializer
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputSerializer
IOException
- I/O exceptionCopyright © 2005–2015 BaseX Team. All rights reserved.