Interface JsonXMLConfig

  • All Known Implementing Classes:
    JsonXMLConfigImpl

    public interface JsonXMLConfig

    Json XML factory configuration interface.

    A JsonXMLConfig instance can be used to configure either of JsonXMLInputFactory or JsonXMLOutputFactory.

    Default values are defined by static DEFAULT instance.

    See Also:
    JsonXMLInputFactory, JsonXMLOutputFactory
    • Field Detail

      • DEFAULT

        static final JsonXMLConfig DEFAULT

        Default configuration:

        • autoArray - false
        • autoPrimitive - false
        • multiplePI - true
        • namespaceDeclarations - true
        • namespaceSeparator - ':'
        • prettyPrint - false
        • virtualRoot - null
    • Method Detail

      • isAutoPrimitive

        boolean isAutoPrimitive()

        Convert element text to number/boolean/null primitives automatically?

        Returns:
        auto primitive flag
        See Also:
        JsonXMLOutputFactory.PROP_AUTO_ARRAY
      • isMultiplePI

        boolean isMultiplePI()

        Whether 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.

        If 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".

        Returns:
        multiple PI flag
        See Also:
        JsonXMLInputFactory.PROP_MULTIPLE_PI, JsonXMLOutputFactory.PROP_MULTIPLE_PI
      • getCustomReplaceRegex

        String getCustomReplaceRegex()
      • getCustomReplaceSequence

        String getCustomReplaceSequence()
      • isReadWriteXmlNil

        boolean isReadWriteXmlNil()
      • isWriteNullForEmptyElements

        boolean isWriteNullForEmptyElements()
        Used in XML->JSON conversion. Decides whether to set null or "" for an empty XML element without nil attribute
        Returns:
        true if null is written, false if "" is written
      • isPreserverNamespacesForJson

        boolean isPreserverNamespacesForJson()
        Preserves the namespace declarations in the JSON output in XML to JSON transformations.
        Returns:
        preserveNamespacesForJson
      • isProcessNCNames

        boolean isProcessNCNames()
        Builds valid XML NCNames when building XML element names in XML to JSON transformations.
        Returns:
        processNCNames