Class JsonStreamingConfigBuilder


  • public class JsonStreamingConfigBuilder
    extends java.lang.Object
    Wraps de.odysseus.staxon.json.JsonXMLConfigBuilder for marshalling purposes.

    In the adapter configuration file this class is aliased as json-streaming-config which is the preferred alternative to the fully qualified classname when building your configuration.

    • Constructor Detail

      • JsonStreamingConfigBuilder

        public JsonStreamingConfigBuilder()
    • Method Detail

      • build

        public de.odysseus.staxon.json.JsonXMLConfig build()
      • autoArray

        public boolean autoArray()
      • autoPrimitive

        public boolean autoPrimitive()
      • namespaceDeclarations

        public boolean namespaceDeclarations()
      • namespaceSeparator

        public char namespaceSeparator()
      • prettyPrint

        public boolean prettyPrint()
      • virtualRoot

        public javax.xml.namespace.QName virtualRoot()
      • repairingNamespaces

        public boolean repairingNamespaces()
      • namespaceMappings

        public java.util.Map<java.lang.String,​java.lang.String> namespaceMappings()
      • withMultipleProcessingInstruction

        public JsonStreamingConfigBuilder withMultipleProcessingInstruction​(java.lang.Boolean b)
      • multiplePI

        public boolean multiplePI()
      • getAutoArray

        public java.lang.Boolean getAutoArray()
        Trigger json arrays automatically; default is false if not specified
      • setAutoArray

        public void setAutoArray​(java.lang.Boolean autoArray)
        Trigger json arrays automatically; default is false if not specified
      • getAutoPrimitive

        public java.lang.Boolean getAutoPrimitive()
        whether to convert element text to number/boolean/null primitives automatically; default is false if not specified.
      • setAutoPrimitive

        public void setAutoPrimitive​(java.lang.Boolean autoPrimitive)
        whether to convert element text to number/boolean/null primitives automatically; default is false if not specified.
      • getMultipleProcessingInstruction

        public java.lang.Boolean getMultipleProcessingInstruction()
        emit "<?xml-multiple ?>" in the XML; default true if not specified.
      • setMultipleProcessingInstruction

        public void setMultipleProcessingInstruction​(java.lang.Boolean multipleProcessingInstruction)
        emit "<?xml-multiple ?>" in the XML; default true if not specified.
      • getNamespaceDeclarations

        public java.lang.Boolean getNamespaceDeclarations()
        whether to write namespace declarations; default is true if not specified.
      • setNamespaceDeclarations

        public void setNamespaceDeclarations​(java.lang.Boolean namespaceDeclarations)
        whether to write namespace declarations; default is true if not specified.
      • getNamespaceSeparator

        public java.lang.Character getNamespaceSeparator()
        namespace separator; default is ':' if not specified.
      • setNamespaceSeparator

        public void setNamespaceSeparator​(java.lang.Character namespaceSeparator)
        namespace separator; default is ':' if not specified.
      • getPrettyPrint

        public java.lang.Boolean getPrettyPrint()
        pretty print or not; default is false if not specified.
      • setPrettyPrint

        public void setPrettyPrint​(java.lang.Boolean prettyPrint)
        pretty print or not; default is false if not specified.
      • getRepairingNamespaces

        public java.lang.Boolean getRepairingNamespaces()
        Whether or not to repair namespaces when writing; default is false if not specified.
      • setRepairingNamespaces

        public void setRepairingNamespaces​(java.lang.Boolean repairingNamespaces)
        Whether or not to repair namespaces when writing; default is false if not specified.
      • getVirtualRoot

        public java.lang.String getVirtualRoot()
        Set the virtual root

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

      • setVirtualRoot

        public void setVirtualRoot​(java.lang.String virtualRoot)
        Set the virtual root

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

      • getNamespaceMappings

        public KeyValuePairSet getNamespaceMappings()
        Any specific namespace mappings.
      • setNamespaceMappings

        public void setNamespaceMappings​(KeyValuePairSet namespaceMappings)
        Any specific namespace mappings.