Package org.json

Examples of org.json.JSONWriter.key()


            jw.key("repositories");
            jw.array();
            for (Repository r : repositories) {
                jw.object();
                jw.key("name");
                jw.value(r.getName());
                jw.key("url");
                String uri = r.getURI().toString();
                jw.value(uri);
                jw.key("actions");
View Full Code Here


            jw.array();
            for (Repository r : repositories) {
                jw.object();
                jw.key("name");
                jw.value(r.getName());
                jw.key("url");
                String uri = r.getURI().toString();
                jw.value(uri);
                jw.key("actions");
                jw.array();
                boolean enable = true;
View Full Code Here

                jw.key("name");
                jw.value(r.getName());
                jw.key("url");
                String uri = r.getURI().toString();
                jw.value(uri);
                jw.key("actions");
                jw.array();
                boolean enable = true;
                if (uri.startsWith("bundle")) {
                    enable = false;
                }
View Full Code Here

                jw.endArray();
                jw.endObject();
            }
            jw.endArray();

            jw.key("features");
            jw.array();
            for (ExtendedFeature f : features) {
                featureInfo(jw, f);
            }
            jw.endArray();
View Full Code Here

    private void writeJSON(final PrintWriter pw) {
        final JSONWriter jw = new JSONWriter(pw);
        final Instance[] instances = adminService.getInstances();
        try {
            jw.object();
            jw.key("status");
            jw.value(getStatusLine());
            jw.key("instances");
            jw.array();
            for (Instance i : instances) {
                instanceInfo(jw, i);
View Full Code Here

        final Instance[] instances = adminService.getInstances();
        try {
            jw.object();
            jw.key("status");
            jw.value(getStatusLine());
            jw.key("instances");
            jw.array();
            for (Instance i : instances) {
                instanceInfo(jw, i);
            }
            jw.endArray();
View Full Code Here

        final JSONWriter jw = new JSONWriter(pw);

        try {
            jw.object();
            jw.key("status");
            jw.value(getStatusLine(groups, nodes));
            jw.key("groups");
            jw.array();
            for (Group g : groups) {
                jw.object();
View Full Code Here

        try {
            jw.object();
            jw.key("status");
            jw.value(getStatusLine(groups, nodes));
            jw.key("groups");
            jw.array();
            for (Group g : groups) {
                jw.object();
                jw.key("name");
                jw.value(g.getName());
View Full Code Here

            jw.value(getStatusLine(groups, nodes));
            jw.key("groups");
            jw.array();
            for (Group g : groups) {
                jw.object();
                jw.key("name");
                jw.value(g.getName());

                Set<Node> members = g.getMembers();
                jw.key("members");
                jw.array();
View Full Code Here

                jw.object();
                jw.key("name");
                jw.value(g.getName());

                Set<Node> members = g.getMembers();
                jw.key("members");
                jw.array();
                if (nodes != null) {
                    for (Node n : members) {
                        jw.object();
                        jw.key("id");
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.