Examples of JsonHierarchicalStreamDriver


Examples of com.thoughtworks.xstream.io.json.JsonHierarchicalStreamDriver

    }

    @Override
    public String retrieveJson() {
        String ret = "";
        XStream xstream = new XStream(new JsonHierarchicalStreamDriver());
        xstream.setMode(XStream.NO_REFERENCES);
        ret = xstream.toXML(env);
        return ret;
    }
View Full Code Here

Examples of com.thoughtworks.xstream.io.json.JsonHierarchicalStreamDriver

    }

    @Override
    public String retrieveJson() {
        String ret = "";
        XStream xstream = new XStream(new JsonHierarchicalStreamDriver());
        xstream.setMode(XStream.NO_REFERENCES);
        ret = xstream.toXML(commands);
        return ret;
    }
View Full Code Here

Examples of com.thoughtworks.xstream.io.json.JsonHierarchicalStreamDriver

    }

    @Override
    public String retrieveJson() {
        String ret = "";
        XStream xstream = new XStream(new JsonHierarchicalStreamDriver());
        xstream.setMode(XStream.NO_REFERENCES);
        ret = xstream.toXML(triggers);
        return ret;
    }
View Full Code Here

Examples of com.thoughtworks.xstream.io.json.JsonHierarchicalStreamDriver

    }

    @Override
    public String retrieveJson() {
        String ret = "";
        XStream xstream = new XStream(new JsonHierarchicalStreamDriver());
        xstream.setMode(XStream.ID_REFERENCES);
        ret = xstream.toXML(objects);
        return ret;
    }
View Full Code Here

Examples of com.thoughtworks.xstream.io.json.JsonHierarchicalStreamDriver

    }

    @Override
    public String retrieveJson() {
        String ret = "";
        XStream xstream = new XStream(new JsonHierarchicalStreamDriver());
        xstream.setMode(XStream.ID_REFERENCES);
        ret = xstream.toXML(objects);
        return ret;
    }
View Full Code Here

Examples of com.thoughtworks.xstream.io.json.JsonHierarchicalStreamDriver

    }

    @Override
    public String retrieveJson() {
        String ret = "";
        XStream xstream = new XStream(new JsonHierarchicalStreamDriver());
        xstream.setMode(XStream.NO_REFERENCES);
        ret = xstream.toXML(commands);
        return ret;
    }
View Full Code Here

Examples of com.thoughtworks.xstream.io.json.JsonHierarchicalStreamDriver

import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.json.JsonHierarchicalStreamDriver;

public class Debug {
    public static String toString(Object o) {
        XStream xstream = new XStream(new JsonHierarchicalStreamDriver());
        return xstream.toXML(o);
    }
View Full Code Here

Examples of com.thoughtworks.xstream.io.json.JsonHierarchicalStreamDriver

    private XStream xstream;
    private ExtJSWrapper wrapper;

    public DefaultExtJson(HttpServletResponse response, TypeNameExtractor extractor, ProxyInitializer initializer)
        throws IOException {
        xstream = new XStream(new JsonHierarchicalStreamDriver() {
            @Override
            public HierarchicalStreamWriter createWriter(Writer writer) {
                return new JsonWriter(writer, new char[0], "", JsonWriter.DROP_ROOT_MODE) {
                    @Override
                    public void addAttribute(String key, String value) {
View Full Code Here

Examples of com.thoughtworks.xstream.io.json.JsonHierarchicalStreamDriver

      */
    protected HierarchicalStreamDriver getHierarchicalStreamDriver() {
        final String newLine = (indented ? INDENTED_NEW_LINE : DEFAULT_NEW_LINE);
        final char[] lineIndenter = (indented ? INDENTED_LINE_INDENTER : DEFAULT_LINE_INDENTER);

        return new JsonHierarchicalStreamDriver() {
            public HierarchicalStreamWriter createWriter(Writer writer) {
                if (withoutRoot) {
                    return new JsonWriter(writer, lineIndenter, newLine, JsonWriter.DROP_ROOT_MODE);
                }

View Full Code Here

Examples of com.thoughtworks.xstream.io.json.JsonHierarchicalStreamDriver

                from("direct:marshal-json").marshal(xstreamDefinition).to("mock:result");
                from("direct:unmarshal-json").unmarshal(xstreamDefinition).to("mock:result");
               
                org.apache.camel.dataformat.xstream.XStreamDataFormat xStreamDataFormat
                    = new org.apache.camel.dataformat.xstream.XStreamDataFormat();
                xStreamDataFormat.setXstreamDriver(new JsonHierarchicalStreamDriver());
                from("direct:myDriver").marshal(xStreamDataFormat).to("mock:result");
            }
        };
    }
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.