Examples of object()


Examples of org.apache.jackrabbit.mk.json.JsopStream.object()

            return null;
        }
        JsopStream json = new JsopStream();
        boolean includeId = filter != null && filter.contains(":id");
        includeId |= filter != null && filter.contains(":hash");
        json.object();
        n.append(json, includeId);
        int max;
        if (maxChildNodes == -1) {
            max = Integer.MAX_VALUE;
            maxChildNodes = Integer.MAX_VALUE;
View Full Code Here

Examples of org.apache.jackrabbit.mk.json.JsopWriter.object()

    }

    @Override
    public String toString() {
        JsopWriter json = new JsopBuilder();
        json.object();
        for (int i = 0; i < size; i++) {
            json.key(names[i]).value(children[i].toString());
        }
        json.endObject();
        return json.toString();
View Full Code Here

Examples of org.apache.jackrabbit.oak.commons.json.JsopBuilder.object()

                    key(":childNodeCount").value(0).endObject();
            String n = jsop.toString();
            assertEquals(n, nodes);
            nodes = mk.getNodes("/", rev, 0, 0, 100, null);
            jsop = new JsopBuilder();
            jsop.object().key(s).object().endObject().
            key(":childNodeCount").value(1).endObject();
            n = jsop.toString();
            assertEquals(n, nodes);
            jsop = new JsopBuilder();
            jsop.tag('-').value(s);
View Full Code Here

Examples of org.apache.jackrabbit.oak.commons.json.JsopStream.object()

            return null;
        }
        JsopStream json = new JsopStream();
        boolean includeId = filter != null && filter.contains(":id");
        includeId |= filter != null && filter.contains(":hash");
        json.object();
        n.append(json, includeId);
        int max;
        if (maxChildNodes == -1) {
            max = Integer.MAX_VALUE;
            maxChildNodes = Integer.MAX_VALUE;
View Full Code Here

Examples of org.apache.jackrabbit.oak.commons.json.JsopWriter.object()

                    String name = t.readString();
                    t.read(':');
                    t.read('{');
                    t.read('}');
                    writer.tag((char) r).key(PathUtils.concat(path, name));
                    writer.object().endObject().newline();
                    break;
                }
                case '-': {
                    String name = t.readString();
                    writer.tag('-').value(PathUtils.concat(path, name));
View Full Code Here

Examples of org.apache.sling.commons.json.io.JSONWriter.object()

            // iterate through the result set and build the "json result"
            while (result.hasNext() && count != 0) {
                Map<String, Object> row = result.next();


                w.object();
                String path = row.get("jcr:path").toString();

                w.key("name");
                w.value(ResourceUtil.getName(path));
View Full Code Here

Examples of org.apache.sling.commons.json.io.JSONWriter.object()

        final Writer out = response.getWriter();
        final JSONWriter w = new JSONWriter(out);

        try {
            w.object();
            for (Map.Entry<String, String> e : data.entrySet()) {
                w.key(e.getKey());
                w.value(e.getValue());
            }
            w.endObject();
View Full Code Here

Examples of org.apache.sling.commons.json.io.JSONWriter.object()

    public void render(Writer out) {

        try {
            JSONWriter writer = new JSONWriter(out);
            writer.object();
            writer.key("status").value(status ? "OK" : "FAILURE");
            if (!StringUtils.isEmpty(message)) {
                writer.key("message").value(message);
            }
            writer.endObject();
View Full Code Here

Examples of org.apache.sling.commons.json.io.JSONWriter.object()

    private static class JsonRenderer implements Renderer {
        public void render(PrintWriter pw, String streamPath, String streamResource) throws IOException {
            JSONWriter w = new JSONWriter(pw);
            try {
                w.object();
                w.key("info");
                w.value("Background job information");
                w.key("jobStreamPath");
                w.value(streamPath);
                w.endObject();
View Full Code Here

Examples of org.apache.sling.commons.json.io.JSONWriter.object()

        JSONWriter jw = new JSONWriter(sw);
        jw.setTidy(true);
        jw.array();

        for(ScriptEngineFactory sef : scriptEngineManager.getEngineFactories()){
            jw.object();
            if(sef.getExtensions().isEmpty()){
                continue;
            }
            jw.key("langName").value(sef.getLanguageName());
            jw.key("langCode").value(sef.getExtensions().get(0));
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.