Package com.thoughtworks.xstream.io.json

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


    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) {
                        if (!key.equals("class")) {
                            super.addAttribute(key, value);
                        }
View Full Code Here


        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);
                }

                return new JsonWriter(writer, lineIndenter, newLine);
            }
        };
    }
View Full Code Here

TOP

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

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.