Package com.sun.jersey.api.json

Examples of com.sun.jersey.api.json.JSONJAXBContext.createMarshaller()


     */
    public void _testXmlCdataAnnotation(final JSONConfiguration configuration) throws Exception {
        final JAXBContext jaxbContext = new JSONJAXBContext(ComplexXmlEventBean.class);

        // Marshal
        final Marshaller marshaller = jaxbContext.createMarshaller();
        final StringWriter writer = new StringWriter();

        final Object testInstance = ComplexXmlEventBean.createTestInstance();
        marshaller.marshal(testInstance,
                Stax2JsonFactory.createWriter(writer, configuration, ComplexXmlEventBean.class, jaxbContext));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.