Package org.json

Examples of org.json.JSONWriter.array()


            response.setHeader("Content-Type", "application/json");
           
            JSONWriter writer = new JSONWriter(response.getWriter());
            writer.object();
            writer.key("expressions");
                writer.array();
                for (String s : localExpressions) {
                    writer.object();
                    writer.key("code"); writer.value(s);
                    writer.key("global"); writer.value(false);
                    writer.key("starred"); writer.value(starredExpressions.contains(s));
View Full Code Here


           
            try {
                Evaluable eval = MetaParser.parse(expression);
               
                writer.key("code"); writer.value("ok");
                writer.key("results"); writer.array();
               
                Properties bindings = ExpressionUtils.createBindings(project);
                for (int i = 0; i < length; i++) {
                    Object result = null;
                   
View Full Code Here

                    jsonWriter.key("type_strict"); jsonWriter.value("should");
                }
               
                if (columnDetails.size() > 0) {
                    jsonWriter.key("properties");
                    jsonWriter.array();
                   
                    for (ColumnDetail c : columnDetails) {
                        int detailCellIndex = project.columnModel.getColumnByName(c.columnName).getCellIndex();
                       
                        Cell cell2 = row.getCell(detailCellIndex);
View Full Code Here

                StringWriter stringWriter = new StringWriter();
                JSONWriter jsonWriter = new JSONWriter(stringWriter);
               
                jsonWriter.object();
                jsonWriter.key("query");
                    jsonWriter.array();
                    jsonWriter.object();
                   
                        jsonWriter.key("id"); jsonWriter.value(null);
                        jsonWriter.key("name"); jsonWriter.value(null);
                        jsonWriter.key("guid"); jsonWriter.value(null);
View Full Code Here

    static protected void formulateQuery(Set<String> ids, JSONObject node, Writer writer) throws JSONException {
        JSONWriter jsonWriter = new JSONWriter(writer);
       
        jsonWriter.object();
        jsonWriter.key("query");
            jsonWriter.array();
            jsonWriter.object();
           
                jsonWriter.key("id"); jsonWriter.value(null);
                jsonWriter.key("id|=");
                    jsonWriter.array();
View Full Code Here

                    jsonWriter.object();
                   
                        jsonWriter.key("id"); jsonWriter.value(null);
                        jsonWriter.key("name"); jsonWriter.value(null);
                        jsonWriter.key("guid"); jsonWriter.value(null);
                        jsonWriter.key("type"); jsonWriter.array(); jsonWriter.endArray();
                       
                        jsonWriter.key("id|=");
                            jsonWriter.array();
                            for (ReconJob job : jobs) {
                                jsonWriter.value(((IdBasedReconJob) job).id);
View Full Code Here

            jsonWriter.array();
            jsonWriter.object();
           
                jsonWriter.key("id"); jsonWriter.value(null);
                jsonWriter.key("id|=");
                    jsonWriter.array();
                    for (String id : ids) {
                        if (id != null) {
                            jsonWriter.value(id);
                        }
                    }
View Full Code Here

                        jsonWriter.key("name"); jsonWriter.value(null);
                        jsonWriter.key("guid"); jsonWriter.value(null);
                        jsonWriter.key("type"); jsonWriter.array(); jsonWriter.endArray();
                       
                        jsonWriter.key("id|=");
                            jsonWriter.array();
                            for (ReconJob job : jobs) {
                                jsonWriter.value(((IdBasedReconJob) job).id);
                            }
                            jsonWriter.endArray();
                       
View Full Code Here

                StringWriter stringWriter = new StringWriter();
                JSONWriter jsonWriter = new JSONWriter(stringWriter);
               
                jsonWriter.object();
                jsonWriter.key("query");
                    jsonWriter.array();
                    jsonWriter.object();
                   
                        jsonWriter.key("id"); jsonWriter.value(null);
                        jsonWriter.key("name"); jsonWriter.value(null);
                        jsonWriter.key("guid"); jsonWriter.value(null);
View Full Code Here

                    jsonWriter.object();
                   
                        jsonWriter.key("id"); jsonWriter.value(null);
                        jsonWriter.key("name"); jsonWriter.value(null);
                        jsonWriter.key("guid"); jsonWriter.value(null);
                        jsonWriter.key("type"); jsonWriter.array(); jsonWriter.endArray();
                       
                        jsonWriter.key("key");
                            jsonWriter.array();
                            jsonWriter.object();
                           
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.