Package com.sun.jersey.json.impl

Examples of com.sun.jersey.json.impl.JSONMarshaller


    @Override
    protected void writeTo(Object t, MediaType mediaType, Charset c,
            Marshaller m, OutputStream entityStream)
            throws JAXBException, IOException {
        if (m instanceof JSONMarshaller) {
            JSONMarshaller jm = (JSONMarshaller)m;
            jm.setJsonEnabled(true);
            jm.marshal(t,
                    new OutputStreamWriter(entityStream, c));
        } else {
            m.marshal(t, JsonXmlStreamWriter.createWriter(
                    new OutputStreamWriter(entityStream, c), true));
        }
View Full Code Here


     * @return marshaller instance with JSON capabilities
     * @throws javax.xml.bind.JAXBException
     */
    @Override
    public Marshaller createMarshaller() throws JAXBException {
        return new JSONMarshaller(jaxbContext, getJSONConfiguration());
    }
View Full Code Here

TOP

Related Classes of com.sun.jersey.json.impl.JSONMarshaller

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.