org.apache.synapse.commons.staxon.core.json

## Class JsonXMLConfigBuilder

- java.lang.Object
- - org.apache.synapse.commons.staxon.core.json.JsonXMLConfigBuilder

-     public class JsonXMLConfigBuilder
      extends java.lang.Object

  Configuration builder with "fluid" interface.

       JsonXMLConfig config = new JsonXMLConfigBuilder().virtualRoot("foo").prettyPrint(true).build();

  Initially, values are set according to `JsonXMLConfig.DEFAULT`.

  See Also:
    `JsonXMLConfig`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected JsonXMLConfigImpl` | `config`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JsonXMLConfigBuilder()` Create a new builder.
    `JsonXMLConfigBuilder(JsonXMLConfigImpl config)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `JsonXMLConfigBuilder` | `autoArray(boolean autoArray)` Set autoArray property and return receiver.
    `JsonXMLConfigBuilder` | `autoPrimitive(boolean autoPrimitive)` Set autoPrimitive property and return receiver.
    `JsonXMLConfig` | `build()` Build a new configuration.
    `JsonXMLConfigBuilder` | `customRegex(java.lang.String regex)` Set Custom Regex for ignore Auto Primitive mode
    `JsonXMLConfigBuilder` | `customReplaceRegex(java.lang.String customReplaceRegex)`
    `JsonXMLConfigBuilder` | `customReplaceSequence(java.lang.String customReplaceSequence)`
    `JsonXMLConfigBuilder` | `multiplePI(boolean multiplePI)` Set multiplePI property and return receiver.
    `JsonXMLConfigBuilder` | `namespaceDeclarations(boolean namespaceDeclarations)` Set namespaceDeclarations property and return receiver.
    `JsonXMLConfigBuilder` | `namespaceSeparator(char namespaceSeparator)` Set namespaceSeparator property and return receiver.
    `JsonXMLConfigBuilder` | `preserverNamespacesForJson(boolean preserverNamespacesForJson)` Set preserveNamespaces property and return receiver.
    `JsonXMLConfigBuilder` | `prettyPrint(boolean prettyPrint)` Set prettyPrint property and return receiver.
    `JsonXMLConfigBuilder` | `processNCNames(boolean processNCNames)` Set processNCNames property and return receiver.
    `JsonXMLConfigBuilder` | `readWriteXmlNil(boolean readWriteXmlNil)` Set readWriteXmlNil property and return receiver.
    `JsonXMLConfigBuilder` | `repairingNamespaces(boolean repairingNamespaces)` Set repairingNamespaces property and return receiver.
    `JsonXMLConfigBuilder` | `virtualRoot(javax.xml.namespace.QName virtualRoot)` Set virtualRoot property and return receiver.
    `JsonXMLConfigBuilder` | `virtualRoot(java.lang.String virtualRoot)` Set virtualRoot property and return receiver.
    `JsonXMLConfigBuilder` | `writeNullForEmptyElement(boolean writeNullForEmptyElements)` Set writeNullForEmptyElement property and return receiver.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### config

          protected final JsonXMLConfigImpl config

  - ### Constructor Detail

    - #### JsonXMLConfigBuilder

          public JsonXMLConfigBuilder()

      Create a new builder.

    - #### JsonXMLConfigBuilder

          public JsonXMLConfigBuilder(JsonXMLConfigImpl config)

  - ### Method Detail

    - #### build

          public JsonXMLConfig build()

      Build a new configuration.
      Returns:
        configuration instance

    - #### autoArray

          public JsonXMLConfigBuilder autoArray(boolean autoArray)

      Set autoArray property and return receiver.
      Parameters:
        `autoArray` -
      Returns:
        this

    - #### autoPrimitive

          public JsonXMLConfigBuilder autoPrimitive(boolean autoPrimitive)

      Set autoPrimitive property and return receiver.
      Parameters:
        `autoPrimitive` -
      Returns:
        this

    - #### multiplePI

          public JsonXMLConfigBuilder multiplePI(boolean multiplePI)

      Set multiplePI property and return receiver.
      Parameters:
        `multiplePI` -
      Returns:
        this

    - #### namespaceDeclarations

          public JsonXMLConfigBuilder namespaceDeclarations(boolean namespaceDeclarations)

      Set namespaceDeclarations property and return receiver.
      Parameters:
        `namespaceDeclarations` -
      Returns:
        this

    - #### namespaceSeparator

          public JsonXMLConfigBuilder namespaceSeparator(char namespaceSeparator)

      Set namespaceSeparator property and return receiver.
      Parameters:
        `namespaceSeparator` -
      Returns:
        this

    - #### prettyPrint

          public JsonXMLConfigBuilder prettyPrint(boolean prettyPrint)

      Set prettyPrint property and return receiver.
      Parameters:
        `prettyPrint` -
      Returns:
        this

    - #### virtualRoot

          public JsonXMLConfigBuilder virtualRoot(javax.xml.namespace.QName virtualRoot)

      Set virtualRoot property and return receiver.
      Parameters:
        `virtualRoot` -
      Returns:
        this

    - #### virtualRoot

          public JsonXMLConfigBuilder virtualRoot(java.lang.String virtualRoot)

      Set virtualRoot property and return receiver.
      Parameters:
        `virtualRoot` - (parsed with `QName.valueOf(String)`)
      Returns:
        this

    - #### repairingNamespaces

          public JsonXMLConfigBuilder repairingNamespaces(boolean repairingNamespaces)

      Set repairingNamespaces property and return receiver.
      Parameters:
        `repairingNamespaces` -
      Returns:
        this

    - #### customRegex

          public JsonXMLConfigBuilder customRegex(java.lang.String regex)

      Set Custom Regex for ignore Auto Primitive mode
      Parameters:
        `regex` -
      Returns:
        this

    - #### customReplaceRegex

          public JsonXMLConfigBuilder customReplaceRegex(java.lang.String customReplaceRegex)

    - #### customReplaceSequence

          public JsonXMLConfigBuilder customReplaceSequence(java.lang.String customReplaceSequence)

    - #### readWriteXmlNil

          public JsonXMLConfigBuilder readWriteXmlNil(boolean readWriteXmlNil)

      Set readWriteXmlNil property and return receiver.
      Parameters:
        `readWriteXmlNil` -
      Returns:
        this

    - #### writeNullForEmptyElement

          public JsonXMLConfigBuilder writeNullForEmptyElement(boolean writeNullForEmptyElements)

      Set writeNullForEmptyElement property and return receiver.
      Parameters:
        `writeNullForEmptyElements` - true if writing null, false if writing ""
      Returns:
        this

    - #### preserverNamespacesForJson

          public JsonXMLConfigBuilder preserverNamespacesForJson(boolean preserverNamespacesForJson)

      Set preserveNamespaces property and return receiver.
      Parameters:
        `preserverNamespacesForJson` - true if writing null, false if writing ""
      Returns:
        this

    - #### processNCNames

          public JsonXMLConfigBuilder processNCNames(boolean processNCNames)

      Set processNCNames property and return receiver.
      Parameters:
        `processNCNames` - true if writing null, false if writing ""
      Returns:
        this

Copyright © 2005-2021 Apache Software Foundation. All Rights Reserved.