public class JsonXMLConfigImpl extends Object implements JsonXMLConfig, Cloneable
Simple JSON XML configuration.
Initially, values are set according to JsonXMLConfig.DEFAULT.
JsonXMLConfigDEFAULT| Constructor and Description |
|---|
JsonXMLConfigImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected JsonXMLConfigImpl |
clone() |
String |
getCustomRegex()
Format output ignoring scientific numbers
|
String |
getCustomReplaceRegex() |
String |
getCustomReplaceSequence() |
char |
getNamespaceSeparator()
Namespace prefix separator.
|
QName |
getVirtualRoot()
JSON documents may have have multiple root properties.
|
boolean |
isAutoArray()
Trigger arrays automatically?
|
boolean |
isAutoPrimitive()
Convert element text to number/boolean/null primitives automatically?
|
boolean |
isMultiplePI()
Whether to use the
JsonXMLStreamConstants.MULTIPLE_PI_TARGET
processing instruction to indicate an array start. |
boolean |
isNamespaceDeclarations()
Whether to write namespace declarations.
|
boolean |
isPrettyPrint()
Format output for better readability?
|
boolean |
isReadWriteXmlNil() |
boolean |
isRepairingNamespaces()
Repair namespaces when writing+>
|
boolean |
isWriteNullForEmptyElements()
Used in XML->JSON conversion.
|
void |
setAutoArray(boolean autoArray) |
void |
setAutoPrimitive(boolean autoPrimitive) |
void |
setCustomRegex(String customRegex) |
void |
setCustomReplaceRegex(String customReplaceRegex) |
void |
setCustomReplaceSequence(String customReplaceSequence) |
void |
setMultiplePI(boolean multiplePI) |
void |
setNamespaceDeclarations(boolean namespaceDeclarations) |
void |
setNamespaceSeparator(char namespaceSeparator) |
void |
setPrettyPrint(boolean prettyPrint) |
void |
setReadWriteXmlNil(boolean readWriteXmlNil) |
void |
setRepairingNamespaces(boolean repairingNamespaces) |
void |
setVirtualRoot(QName virtualRoot) |
void |
setWriteNullForEmptyElement(boolean writeNullForEmptyElement) |
protected JsonXMLConfigImpl clone()
public boolean isAutoArray()
JsonXMLConfigTrigger arrays automatically?
isAutoArray in interface JsonXMLConfigJsonXMLOutputFactory.PROP_AUTO_ARRAYpublic void setAutoArray(boolean autoArray)
public boolean isAutoPrimitive()
JsonXMLConfigConvert element text to number/boolean/null primitives automatically?
isAutoPrimitive in interface JsonXMLConfigJsonXMLOutputFactory.PROP_AUTO_ARRAYpublic void setAutoPrimitive(boolean autoPrimitive)
public boolean isMultiplePI()
JsonXMLConfigWhether to use the JsonXMLStreamConstants.MULTIPLE_PI_TARGET
processing instruction to indicate an array start.
If true, a PI is used to inform the writer to begin an array,
passing the name of following multiple elements as data.
The writer will close arrays automatically.
true, this reader will insert a PI with the field
name as PI data.
Note that the element given in the PI may occur zero times, indicating an "empty array".
isMultiplePI in interface JsonXMLConfigJsonXMLInputFactory.PROP_MULTIPLE_PI,
JsonXMLOutputFactory.PROP_MULTIPLE_PIpublic void setMultiplePI(boolean multiplePI)
public boolean isNamespaceDeclarations()
JsonXMLConfigWhether to write namespace declarations.
isNamespaceDeclarations in interface JsonXMLConfigJsonXMLOutputFactory.PROP_NAMESPACE_DECLARATIONSpublic void setNamespaceDeclarations(boolean namespaceDeclarations)
public char getNamespaceSeparator()
JsonXMLConfigNamespace prefix separator.
getNamespaceSeparator in interface JsonXMLConfigJsonXMLInputFactory.PROP_NAMESPACE_SEPARATOR,
JsonXMLOutputFactory.PROP_NAMESPACE_SEPARATORpublic void setNamespaceSeparator(char namespaceSeparator)
public boolean isPrettyPrint()
JsonXMLConfigFormat output for better readability?
isPrettyPrint in interface JsonXMLConfigJsonXMLOutputFactory.PROP_PRETTY_PRINTpublic void setPrettyPrint(boolean prettyPrint)
public QName getVirtualRoot()
JsonXMLConfigJSON documents may have have multiple root properties. However, XML requires a single root element. This property specifies the root as a "virtual" element, which will be removed from the stream when writing and added to the stream when reading.
getVirtualRoot in interface JsonXMLConfigJsonXMLInputFactory.PROP_VIRTUAL_ROOT,
JsonXMLOutputFactory.PROP_VIRTUAL_ROOTpublic void setVirtualRoot(QName virtualRoot)
public boolean isRepairingNamespaces()
JsonXMLConfigRepair namespaces when writing+>
isRepairingNamespaces in interface JsonXMLConfigXMLOutputFactory.IS_REPAIRING_NAMESPACESpublic void setRepairingNamespaces(boolean repairingNamespaces)
public String getCustomRegex()
JsonXMLConfigFormat output ignoring scientific numbers
getCustomRegex in interface JsonXMLConfigJsonXMLOutputFactory.PROP_CUSTOM_REGEXpublic void setCustomRegex(String customRegex)
public String getCustomReplaceRegex()
getCustomReplaceRegex in interface JsonXMLConfigpublic void setCustomReplaceRegex(String customReplaceRegex)
public String getCustomReplaceSequence()
getCustomReplaceSequence in interface JsonXMLConfigpublic void setCustomReplaceSequence(String customReplaceSequence)
public void setReadWriteXmlNil(boolean readWriteXmlNil)
public void setWriteNullForEmptyElement(boolean writeNullForEmptyElement)
public boolean isReadWriteXmlNil()
isReadWriteXmlNil in interface JsonXMLConfigpublic boolean isWriteNullForEmptyElements()
JsonXMLConfigisWriteNullForEmptyElements in interface JsonXMLConfigCopyright © 2005–2019 Apache Software Foundation. All rights reserved.