Package com.thoughtworks.xstream.io.json

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


     * @param jqPlot
     * @return
     */
    public static String jqPlotToJson(ChartConfiguration jqPlot) {

        XStream xstream = new XStream(new JsonHierarchicalStreamDriver() {

            @Override
            public HierarchicalStreamWriter createWriter(Writer writer) {
                return new JqPlotJsonMapHierarchicalWriter(writer, JsonWriter.DROP_ROOT_MODE) {

View Full Code Here


     * @param jqPlot
     * @return
     */
    public static String jqPlotToJson(ChartConfiguration jqPlot) {

        XStream xstream = new XStream(new JsonHierarchicalStreamDriver() {

            @Override
            public HierarchicalStreamWriter createWriter(Writer writer) {
                return new JqPlotJsonMapHierarchicalWriter(writer, JsonWriter.DROP_ROOT_MODE) {

View Full Code Here

     */
    public JsonRepresentation getJsonRepresentation(TileLayer layer) {
        JsonRepresentation rep = null;
        try {
            XStream xs = xmlConfig.getConfiguredXStreamWithContext(new XStream(
                    new JsonHierarchicalStreamDriver()), Context.REST);
            JSONObject obj = new JSONObject(xs.toXML(layer));
            rep = new JsonRepresentation(obj);
        } catch (JSONException jse) {
            jse.printStackTrace();
        }
View Full Code Here

            }
        } else {
            layerName = null;
        }
        try {
            XStream xs = new XStream(new JsonHierarchicalStreamDriver());
            JSONObject obj = null;
            long[][] list;
            if (null == layerName) {
                list = seeder.getStatusList();
            } else {
View Full Code Here

    }

    private JsonRepresentation getJsonRepresentation(DiskQuotaConfig config) throws JSONException {
        JsonRepresentation rep = null;
        XStream xs = ConfigLoader.getConfiguredXStream(new XStream(
                new JsonHierarchicalStreamDriver()));
        JSONObject obj = new JSONObject(xs.toXML(config));
        rep = new JsonRepresentation(obj);
        return rep;
    }
View Full Code Here

TOP

Related Classes of com.thoughtworks.xstream.io.json.JsonHierarchicalStreamDriver

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.