Package org.apache.sling.commons.json.jcr

Examples of org.apache.sling.commons.json.jcr.JsonItemWriter.dump()


        if(n != null) {
            final PrintWriter pw = new PrintWriter(jsonData);
            final JsonItemWriter j = new JsonItemWriter(null);
            final int maxRecursionLevels = 1;
            pw.print("var currentNode=");
            j.dump(n, pw, maxRecursionLevels);
            pw.print(";");
            pw.flush();
        }

        // run XSLT transform on script, passing parameter
View Full Code Here


        if (node != null) {

            JsonItemWriter writer = new JsonItemWriter(null);
            StringWriter string = new StringWriter();
            try {
                writer.dump(node, string, -1);
            } catch (RepositoryException e) {
                throw new ServletException(e);
            }
            config = new JSONObject(string.toString());
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.