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

# Class JsonXMLBinder

java.lang.Object
org.apache.synapse.commons.staxon.core.json.jaxb.JsonXMLBinder

public class JsonXMLBinder extends Object
Read/write instances of JAXB-annotated classes from/to JSON.

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  ``
  `JsonXMLBinder()`
  `protected`
  `JsonXMLBinder(boolean writeDocumentArray)`
  `protected`
  `JsonXMLBinder(JsonXMLRootProvider rootProvider, boolean writeDocumentArray)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected JsonXMLInputFactory`
  `createInputFactory(Class<?> type, JsonXML config)`
  `protected JsonXMLOutputFactory`
  `createOutputFactory(Class<?> type, JsonXML config)`
  `protected XMLStreamReader`
  `createXMLStreamReader(Class<?> type, JsonXML config, Reader stream)`
  `protected XMLStreamWriter`
  `createXMLStreamWriter(Class<?> type, JsonXML config, Writer stream)`
  `boolean`
  `isBindable(Class<?> type)`
  `protected void`
  `marshal(Class<?> type, JsonXML config, jakarta.xml.bind.Marshaller marshaller, XMLStreamWriter writer, Object value)`
  `<T> List<T>`
  `readArray(Class<? extends T> type, JsonXML config, jakarta.xml.bind.JAXBContext context, Reader stream)`
  `<T> T`
  `readObject(Class<? extends T> type, JsonXML config, jakarta.xml.bind.JAXBContext context, Reader stream)`
  `protected <T> T`
  `unmarshal(Class<? extends T> type, JsonXML config, jakarta.xml.bind.Unmarshaller unmarshaller, XMLStreamReader reader)`
  `void`
  `writeArray(Class<?> type, JsonXML config, jakarta.xml.bind.JAXBContext context, Writer stream, Collection<?> collection)`
  `void`
  `writeObject(Class<?> type, JsonXML config, jakarta.xml.bind.JAXBContext context, Writer stream, Object value)`

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

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

- ## Constructor Details

  - ### JsonXMLBinder

    public JsonXMLBinder()

  - ### JsonXMLBinder

    protected JsonXMLBinder(boolean writeDocumentArray)

  - ### JsonXMLBinder

    protected JsonXMLBinder(JsonXMLRootProvider rootProvider, boolean writeDocumentArray)

- ## Method Details

  - ### createInputFactory

    protected JsonXMLInputFactory createInputFactory(Class<?> type, JsonXML config) throws jakarta.xml.bind.JAXBException
    Throws:
      `jakarta.xml.bind.JAXBException`

  - ### createXMLStreamReader

    protected XMLStreamReader createXMLStreamReader(Class<?> type, JsonXML config, Reader stream) throws XMLStreamException, jakarta.xml.bind.JAXBException
    Throws:
      `XMLStreamException`
      `jakarta.xml.bind.JAXBException`

  - ### createOutputFactory

    protected JsonXMLOutputFactory createOutputFactory(Class<?> type, JsonXML config) throws jakarta.xml.bind.JAXBException
    Throws:
      `jakarta.xml.bind.JAXBException`

  - ### createXMLStreamWriter

    protected XMLStreamWriter createXMLStreamWriter(Class<?> type, JsonXML config, Writer stream) throws XMLStreamException, jakarta.xml.bind.JAXBException
    Throws:
      `XMLStreamException`
      `jakarta.xml.bind.JAXBException`

  - ### isBindable

    public boolean isBindable(Class<?> type)

  - ### unmarshal

    protected <T> T unmarshal(Class<? extends T> type, JsonXML config, jakarta.xml.bind.Unmarshaller unmarshaller, XMLStreamReader reader) throws jakarta.xml.bind.JAXBException, XMLStreamException
    Throws:
      `jakarta.xml.bind.JAXBException`
      `XMLStreamException`

  - ### marshal

    protected void marshal(Class<?> type, JsonXML config, jakarta.xml.bind.Marshaller marshaller, XMLStreamWriter writer, Object value) throws jakarta.xml.bind.JAXBException, XMLStreamException
    Throws:
      `jakarta.xml.bind.JAXBException`
      `XMLStreamException`

  - ### readObject

    public <T> T readObject(Class<? extends T> type, JsonXML config, jakarta.xml.bind.JAXBContext context, Reader stream) throws XMLStreamException, jakarta.xml.bind.JAXBException
    Throws:
      `XMLStreamException`
      `jakarta.xml.bind.JAXBException`

  - ### writeObject

    public void writeObject(Class<?> type, JsonXML config, jakarta.xml.bind.JAXBContext context, Writer stream, Object value) throws XMLStreamException, jakarta.xml.bind.JAXBException
    Throws:
      `XMLStreamException`
      `jakarta.xml.bind.JAXBException`

  - ### readArray

    public <T> List<T> readArray(Class<? extends T> type, JsonXML config, jakarta.xml.bind.JAXBContext context, Reader stream) throws XMLStreamException, jakarta.xml.bind.JAXBException
    Throws:
      `XMLStreamException`
      `jakarta.xml.bind.JAXBException`

  - ### writeArray

    public void writeArray(Class<?> type, JsonXML config, jakarta.xml.bind.JAXBContext context, Writer stream, Collection<?> collection) throws XMLStreamException, jakarta.xml.bind.JAXBException
    Throws:
      `XMLStreamException`
      `jakarta.xml.bind.JAXBException`