public interface JsonHandler
Modifier and Type | Method and Description |
---|---|
void |
endArray()
Close the current array
|
void |
endMap()
Close the current object/map
|
Item |
getResult() |
void |
setKey(String key)
Set the key to be written for the next entry in an object/map
|
void |
startArray()
Open a new array
|
void |
startMap()
Start a new object/map
|
void |
writeBoolean(boolean value)
Write a boolean value
|
void |
writeNull()
Write a null value
|
void |
writeNumeric(String asString,
double asDouble)
Write a numeric value
|
void |
writeString(String val)
Write a string value
|
Item getResult() throws XPathException
XPathException
void setKey(String key)
key
- the key for the entry - null implies no keyvoid startArray() throws XPathException
XPathException
- if any error occursvoid endArray() throws XPathException
XPathException
- if any error occursvoid startMap() throws XPathException
XPathException
- if any error occursvoid endMap() throws XPathException
XPathException
- if any error occursvoid writeNumeric(String asString, double asDouble) throws XPathException
asString
- the string representation of the valueasDouble
- the double representation of the valueXPathException
- if any error occursvoid writeString(String val) throws XPathException
val
- The string to be written (which may or may not contain JSON escape sequences, according to the
options that were set)XPathException
- if any error occursvoid writeBoolean(boolean value) throws XPathException
value
- the boolean value to be writtenXPathException
- if any error occursvoid writeNull() throws XPathException
XPathException
- if any error occursCopyright (c) 2004-2014 Saxonica Limited. All rights reserved.