Package org.json

Examples of org.json.JSONWriter.endArray()


            for (Instance i : instances) {
//                if (!i.isRoot()) {
                    instanceInfo(jw, i);
//                }
            }
            jw.endArray();
            jw.endObject();
        } catch (JSONException ex) {
            Logger.getLogger(AdminPlugin.class.getName()).log(Level.SEVERE, null, ex);
        } catch (Exception ex) {
            Logger.getLogger(AdminPlugin.class.getName()).log(Level.SEVERE, null, ex);
View Full Code Here


            writer.key("locks");
            writer.array();
            for (Lock lock : cursor) {
                writer.value(lockToJSON(lock, uid));
            }
            writer.endArray();
            writer.endObject();
           
            w.flush();
            w.close();
        } finally {
View Full Code Here

                writer.key("transformations");
                writer.array();
                    for (Text s : project.transformations) {
                        writer.value(s.toString());
                    }
                writer.endArray();
            writer.endObject();
            w.flush();
            w.close();
        } finally {
            pm.close();
View Full Code Here

            writer.array();
                int size = project.transformations.size();
                for (int i = tindex; i < size; i++) {
                    writer.value(project.transformations.get(i).toString());
                }
            writer.endArray();
            writer.endObject();
            w.flush();
            w.close();
        } finally {
            pm.close();
View Full Code Here

            writer.key("transformations");
            writer.array();
                for (String s : project.transformations) {
                    writer.value(new JSONObject(s));
                }
            writer.endArray();
        writer.endObject();
        w.flush();
        w.close();
    }
       
View Full Code Here

        writer.array();
            int size = project.transformations.size();
            for (int i = rev; i < size; i++) {
                writer.value(new JSONObject(project.transformations.get(i)));
            }
        writer.endArray();

        EntityCursor<Lock> cursor = locksByProject.subIndex(pid).entities();
       
        try {
            writer.key("locks");
View Full Code Here

                    writer.key("operation");
                    entry.operation.write(writer, options);
                }
                writer.endObject();
            }
            writer.endArray();
            writer.endObject();
        } catch (JSONException e) {
            respondException(response, e);
        }
    }
View Full Code Here

                }
               
                jsonWriter.key("mode"); jsonWriter.value("row-based");
                jsonWriter.key("rows"); jsonWriter.array();
                filteredRows.accept(project, visitor);
                jsonWriter.endArray();
                jsonWriter.key("filtered"); jsonWriter.value(rwv.total);
                jsonWriter.key("total"); jsonWriter.value(project.rows.size());
            } else {
                FilteredRecords filteredRecords = engine.getFilteredRecords();
                RecordVisitor visitor = rwv;
View Full Code Here

                }
               
                jsonWriter.key("mode"); jsonWriter.value("record-based");
                jsonWriter.key("rows"); jsonWriter.array();
                filteredRecords.accept(project, visitor);
                jsonWriter.endArray();
                jsonWriter.key("filtered"); jsonWriter.value(rwv.total);
                jsonWriter.key("total"); jsonWriter.value(project.recordModel.getRecordCount());
            }
           
           
View Full Code Here

                for (String s : starredExpressions) {
                    writer.object();
                    writer.key("code"); writer.value(s);
                    writer.endObject();
                }
                writer.endArray();
            writer.endObject();
        } catch (Exception e) {
            respondException(response, e);
        }
    }
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.