public class JSONEmitter
extends java.lang.Object
| Constructor and Description |
|---|
JSONEmitter(PipelineConfiguration pipe,
javax.xml.transform.stream.StreamResult result,
java.util.Properties outputProperties) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
End of the document.
|
void |
endArray()
Output the end of an array
|
void |
endMap() |
java.util.Properties |
getOutputProperties()
Get the output properties
|
void |
setCharacterMap(CharacterMap map)
Set the CharacterMap to be used, if any
|
void |
setNormalizer(Normalizer normalizer)
Set the Unicode normalizer to be used for normalizing strings.
|
void |
setOutputProperties(java.util.Properties details)
Set output properties
|
void |
startArray(boolean oneLiner)
Output the start of an array.
|
void |
startMap(boolean oneLiner)
Output the start of an map.
|
void |
writeAtomicValue(AtomicValue item)
Append a singleton value (number, string, or boolean) to the output
|
void |
writeKey(java.lang.String key)
Output the key for an entry in a map.
|
public JSONEmitter(PipelineConfiguration pipe, javax.xml.transform.stream.StreamResult result, java.util.Properties outputProperties) throws XPathException
XPathExceptionpublic void setOutputProperties(java.util.Properties details)
details - the output serialization propertiespublic java.util.Properties getOutputProperties()
public void setNormalizer(Normalizer normalizer)
normalizer - the normalizer to be usedpublic void setCharacterMap(CharacterMap map)
map - the character mappublic void writeKey(java.lang.String key)
throws XPathException
key - the value of the key, without any escaping of special charactersXPathException - if any error occurspublic void writeAtomicValue(AtomicValue item) throws XPathException
item - the atomic value to be appended, or null to append "null"XPathException - if the operation failspublic void startArray(boolean oneLiner)
throws XPathException
endArray().oneLiner - True if the caller thinks the value should be output without extra newlines
after the open bracket or before the close bracket,
even when indenting is on.XPathException - if any failure occurspublic void endArray()
throws XPathException
XPathException - if any failure occurspublic void startMap(boolean oneLiner)
throws XPathException
writeKey(String), followed by a call on
endMap().oneLiner - True if the caller thinks the value should be output without extra newlines
after the open bracket or before the close bracket,
even when indenting is on.XPathException - if any failure occurspublic void endMap()
throws XPathException
XPathExceptionpublic void close()
throws XPathException
XPathExceptionCopyright (c) 2004-2020 Saxonica Limited. All rights reserved.