de.odysseus.staxon.json.jaxb
Class JsonXMLMapper<T>
java.lang.Object
de.odysseus.staxon.json.jaxb.JsonXMLMapper<T>
public class JsonXMLMapper<T>
- extends Object
Read/write instances of JAXB-annotated classes from/to JSON.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JsonXMLMapper
public JsonXMLMapper(Class<T> type)
throws JAXBException
- Throws:
JAXBException
JsonXMLMapper
public JsonXMLMapper(Class<T> type,
JsonXML config)
throws JAXBException
- Throws:
JAXBException
createBinder
protected JsonXMLBinder createBinder(JsonXML config)
createContext
protected JAXBContext createContext(JsonXML config)
throws JAXBException
- Throws:
JAXBException
readObject
public T readObject(Reader reader)
throws JAXBException,
XMLStreamException
- Throws:
JAXBException
XMLStreamException
readObject
public T readObject(InputStream input)
throws JAXBException,
XMLStreamException
- Throws:
JAXBException
XMLStreamException
writeObject
public void writeObject(Writer writer,
T value)
throws JAXBException,
XMLStreamException
- Throws:
JAXBException
XMLStreamException
writeObject
public void writeObject(OutputStream output,
T value)
throws JAXBException,
XMLStreamException
- Throws:
JAXBException
XMLStreamException
readArray
public List<T> readArray(Reader reader)
throws JAXBException,
XMLStreamException
- Throws:
JAXBException
XMLStreamException
readArray
public List<T> readArray(InputStream input)
throws JAXBException,
XMLStreamException
- Throws:
JAXBException
XMLStreamException
writeArray
public void writeArray(Writer writer,
Collection<T> collection)
throws JAXBException,
XMLStreamException
- Throws:
JAXBException
XMLStreamException
writeArray
public void writeArray(OutputStream output,
Collection<T> collection)
throws JAXBException,
XMLStreamException
- Throws:
JAXBException
XMLStreamException
Copyright © 2011-2012. All Rights Reserved.