de.odysseus.staxon.json.jaxb
Class JsonXMLBinder
java.lang.Object
de.odysseus.staxon.json.jaxb.JsonXMLBinder
public class JsonXMLBinder
- extends Object
Read/write instances of JAXB-annotated classes from/to JSON.
|
Method Summary |
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,
Marshaller marshaller,
XMLStreamWriter writer,
Object value)
|
|
readArray(Class<? extends T> type,
JsonXML config,
JAXBContext context,
Reader stream)
|
|
readObject(Class<? extends T> type,
JsonXML config,
JAXBContext context,
Reader stream)
|
protected
|
unmarshal(Class<? extends T> type,
JsonXML config,
Unmarshaller unmarshaller,
XMLStreamReader reader)
|
void |
writeArray(Class<?> type,
JsonXML config,
JAXBContext context,
Writer stream,
Collection<?> collection)
|
void |
writeObject(Class<?> type,
JsonXML config,
JAXBContext context,
Writer stream,
Object value)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JsonXMLBinder
public JsonXMLBinder()
JsonXMLBinder
protected JsonXMLBinder(boolean writeDocumentArray)
JsonXMLBinder
protected JsonXMLBinder(JsonXMLRootProvider rootProvider,
boolean writeDocumentArray)
createInputFactory
protected JsonXMLInputFactory createInputFactory(Class<?> type,
JsonXML config)
throws JAXBException
- Throws:
JAXBException
createXMLStreamReader
protected XMLStreamReader createXMLStreamReader(Class<?> type,
JsonXML config,
Reader stream)
throws XMLStreamException,
JAXBException
- Throws:
XMLStreamException
JAXBException
createOutputFactory
protected JsonXMLOutputFactory createOutputFactory(Class<?> type,
JsonXML config)
throws JAXBException
- Throws:
JAXBException
createXMLStreamWriter
protected XMLStreamWriter createXMLStreamWriter(Class<?> type,
JsonXML config,
Writer stream)
throws XMLStreamException,
JAXBException
- Throws:
XMLStreamException
JAXBException
isBindable
public boolean isBindable(Class<?> type)
unmarshal
protected <T> T unmarshal(Class<? extends T> type,
JsonXML config,
Unmarshaller unmarshaller,
XMLStreamReader reader)
throws JAXBException,
XMLStreamException
- Throws:
JAXBException
XMLStreamException
marshal
protected void marshal(Class<?> type,
JsonXML config,
Marshaller marshaller,
XMLStreamWriter writer,
Object value)
throws JAXBException,
XMLStreamException
- Throws:
JAXBException
XMLStreamException
readObject
public <T> T readObject(Class<? extends T> type,
JsonXML config,
JAXBContext context,
Reader stream)
throws XMLStreamException,
JAXBException
- Throws:
XMLStreamException
JAXBException
writeObject
public void writeObject(Class<?> type,
JsonXML config,
JAXBContext context,
Writer stream,
Object value)
throws XMLStreamException,
JAXBException
- Throws:
XMLStreamException
JAXBException
readArray
public <T> List<T> readArray(Class<? extends T> type,
JsonXML config,
JAXBContext context,
Reader stream)
throws XMLStreamException,
JAXBException
- Throws:
XMLStreamException
JAXBException
writeArray
public void writeArray(Class<?> type,
JsonXML config,
JAXBContext context,
Writer stream,
Collection<?> collection)
throws XMLStreamException,
JAXBException
- Throws:
XMLStreamException
JAXBException
Copyright © 2011-2012. All Rights Reserved.