Package com.sun.jersey.api.json

Examples of com.sun.jersey.api.json.JSONConfiguration$MappedJettisonBuilder


    }

    @Override
    public final void writeList(Class<?> elementType, Collection<?> t, MediaType mediaType, Charset c, Marshaller m, OutputStream entityStream) throws JAXBException, IOException {
        final OutputStreamWriter osw = new OutputStreamWriter(entityStream, c);
        JSONConfiguration jsonConfig = JSONConfiguration.DEFAULT;
        if (m instanceof JSONConfigurated) {
            jsonConfig = ((JSONConfigurated)m).getJSONConfiguration();
        }
        final XMLStreamWriter jxsw = Stax2JsonFactory.createWriter(osw, jsonConfig, true);
        try {
View Full Code Here


        }
    }

    @Override
    protected final XMLStreamReader getXMLStreamReader(Class<?> elementType, MediaType mediaType, Unmarshaller u, InputStream entityStream) throws XMLStreamException {
        JSONConfiguration c = JSONConfiguration.DEFAULT;
        if (u instanceof JSONConfigurated) {
            c = ((JSONConfigurated) u).getJSONConfiguration();
        }
        return Stax2JsonFactory.createReader(new InputStreamReader(entityStream), c, JSONHelper.getRootElementName((Class)elementType), true);
    }
View Full Code Here

TOP

Related Classes of com.sun.jersey.api.json.JSONConfiguration$MappedJettisonBuilder

Copyright © 2018 www.massapicom. 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.