@Test public void testWriteXmlTypeWithNamespace() throws Exception { JsonXML config = JsonXMLDefault.class.getAnnotation(JsonXML.class); JsonXMLMapper<SampleTypeWithNamespace> mapper = new JsonXMLMapper<SampleTypeWithNamespace>(SampleTypeWithNamespace.class, config); StringWriter writer = new StringWriter(); SampleTypeWithNamespace value = new SampleTypeWithNamespace(); mapper.writeObject(writer, value); writer.close(); Assert.assertEquals("{\"ns2:sampleTypeWithNamespace\":{\"@xmlns:ns2\":\"urn:staxon:jaxb:test\"}}", writer.toString()); }
public void writeObject(Writer writer, T value) throws JAXBException, XMLStreamException { binder.writeObject(type, config, context, writer, value); }
JsonXMLMapper { public void writeObject(Writer writer, T value) throws JAXBException, XMLStreamException { binder.writeObject(type, config, context, writer, value); } }
JsonXMLMapper { public void writeObject(Writer writer, T value) throws JAXBException, XMLStreamException { binder.writeObject(type, config, context, writer, value); } JsonXMLMapper(Class<T> type);  JsonXMLMapper(Class<T> type, JsonXML config); }
JsonXMLMapper { public void writeObject(Writer writer, T value) throws JAXBException, XMLStreamException { binder.writeObject(type, config, context, writer, value); } JsonXMLMapper(Class<T> type);  JsonXMLMapper(Class<T> type, JsonXML config); T readObject(Reader reader); T readObject(InputStream input); void writeObject(Writer writer, T value); void writeObject(OutputStream output, T value); List<T> readArray(Reader reader); List<T> readArray(InputStream input); void writeArray(Writer writer, Collection<T> collection); void writeArray(OutputStream output, Collection<T> collection); }
JsonXMLMapper { public void writeObject(Writer writer, T value) throws JAXBException, XMLStreamException { binder.writeObject(type, config, context, writer, value); } JsonXMLMapper(Class<T> type);  JsonXMLMapper(Class<T> type, JsonXML config); T readObject(Reader reader); T readObject(InputStream input); void writeObject(Writer writer, T value); void writeObject(OutputStream output, T value); List<T> readArray(Reader reader); List<T> readArray(InputStream input); void writeArray(Writer writer, Collection<T> collection); void writeArray(OutputStream output, Collection<T> collection);  }