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

## Class JsonXMLMapper<T>

- java.lang.Object
- - org.apache.synapse.commons.staxon.core.json.jaxb.JsonXMLMapper<T>

-     public class JsonXMLMapper<T>
      extends java.lang.Object

  Read/write instances of JAXB-annotated classes from/to JSON.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JsonXMLMapper(java.lang.Class<T> type)`
    `JsonXMLMapper(java.lang.Class<T> type, JsonXML config)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected JsonXMLBinder` | `createBinder(JsonXML config)`
    `protected javax.xml.bind.JAXBContext` | `createContext(JsonXML config)`
    `java.util.List<T>` | `readArray(java.io.InputStream input)`
    `java.util.List<T>` | `readArray(java.io.Reader reader)`
    `T` | `readObject(java.io.InputStream input)`
    `T` | `readObject(java.io.Reader reader)`
    `void` | `writeArray(java.io.OutputStream output, java.util.Collection<T> collection)`
    `void` | `writeArray(java.io.Writer writer, java.util.Collection<T> collection)`
    `void` | `writeObject(java.io.OutputStream output, T value)`
    `void` | `writeObject(java.io.Writer writer, T value)`

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

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

- - ### Constructor Detail

    - #### JsonXMLMapper

          public JsonXMLMapper(java.lang.Class<T> type)
                        throws javax.xml.bind.JAXBException

      Throws:
        `javax.xml.bind.JAXBException`

    - #### JsonXMLMapper

          public JsonXMLMapper(java.lang.Class<T> type,
                               JsonXML config)
                        throws javax.xml.bind.JAXBException

      Throws:
        `javax.xml.bind.JAXBException`

  - ### Method Detail

    - #### createBinder

          protected JsonXMLBinder createBinder(JsonXML config)

    - #### createContext

          protected javax.xml.bind.JAXBContext createContext(JsonXML config)
                                                      throws javax.xml.bind.JAXBException

      Throws:
        `javax.xml.bind.JAXBException`

    - #### readObject

          public T readObject(java.io.Reader reader)
                       throws javax.xml.bind.JAXBException,
                              javax.xml.stream.XMLStreamException

      Throws:
        `javax.xml.bind.JAXBException`
        `javax.xml.stream.XMLStreamException`

    - #### readObject

          public T readObject(java.io.InputStream input)
                       throws javax.xml.bind.JAXBException,
                              javax.xml.stream.XMLStreamException

      Throws:
        `javax.xml.bind.JAXBException`
        `javax.xml.stream.XMLStreamException`

    - #### writeObject

          public void writeObject(java.io.Writer writer,
                                  T value)
                           throws javax.xml.bind.JAXBException,
                                  javax.xml.stream.XMLStreamException

      Throws:
        `javax.xml.bind.JAXBException`
        `javax.xml.stream.XMLStreamException`

    - #### writeObject

          public void writeObject(java.io.OutputStream output,
                                  T value)
                           throws javax.xml.bind.JAXBException,
                                  javax.xml.stream.XMLStreamException

      Throws:
        `javax.xml.bind.JAXBException`
        `javax.xml.stream.XMLStreamException`

    - #### readArray

          public java.util.List<T> readArray(java.io.Reader reader)
                                      throws javax.xml.bind.JAXBException,
                                             javax.xml.stream.XMLStreamException

      Throws:
        `javax.xml.bind.JAXBException`
        `javax.xml.stream.XMLStreamException`

    - #### readArray

          public java.util.List<T> readArray(java.io.InputStream input)
                                      throws javax.xml.bind.JAXBException,
                                             javax.xml.stream.XMLStreamException

      Throws:
        `javax.xml.bind.JAXBException`
        `javax.xml.stream.XMLStreamException`

    - #### writeArray

          public void writeArray(java.io.Writer writer,
                                 java.util.Collection<T> collection)
                          throws javax.xml.bind.JAXBException,
                                 javax.xml.stream.XMLStreamException

      Throws:
        `javax.xml.bind.JAXBException`
        `javax.xml.stream.XMLStreamException`

    - #### writeArray

          public void writeArray(java.io.OutputStream output,
                                 java.util.Collection<T> collection)
                          throws javax.xml.bind.JAXBException,
                                 javax.xml.stream.XMLStreamException

      Throws:
        `javax.xml.bind.JAXBException`
        `javax.xml.stream.XMLStreamException`

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