Package org.json

Examples of org.json.JSONWriter.endObject()


        Writer w = response.getWriter();
        JSONWriter writer = new JSONWriter(w);
        try {
            writer.object();
            writer.key("config"); ImportingManager.writeConfiguration(writer, new Properties());
            writer.endObject();
        } catch (JSONException e) {
            throw new ServletException(e);
        } finally {
            w.flush();
            w.close();
View Full Code Here


                    }
                    writer.endArray();
                }
                writer.endArray();
               
            writer.endObject();
        } catch (Exception e) {
            respondException(response, e);
        }
    }
}
View Full Code Here

                for (ReconJob job : jobs) {
                    jsonWriter.value(((GuidBasedReconJob) job).guid);
                }
                jsonWriter.endArray();

                jsonWriter.endObject();
                jsonWriter.endArray();
                jsonWriter.endObject();

                query = stringWriter.toString();
            }
View Full Code Here

                }
                jsonWriter.endArray();

                jsonWriter.endObject();
                jsonWriter.endArray();
                jsonWriter.endObject();

                query = stringWriter.toString();
            }
           
            StringBuffer sb = new StringBuffer(1024);
View Full Code Here

            writer.write('\n');

            jsonWriter.key("preferences");
            _preferenceStore.write(jsonWriter, new Properties());

            jsonWriter.endObject();
        } finally {
            writer.close();
        }
    }
View Full Code Here

        try {
            JSONWriter writer = new JSONWriter(w);
            writer.object();
            writer.key("status"); writer.value(status);
            writer.key("message"); writer.value(message);
            writer.endObject();
            w.flush();
            w.close();
        } catch (JSONException e) {
            // This can never occue
        }
View Full Code Here

                    writer.key(key);
                    writer.value(pref);
                }
            }
           
            writer.endObject();
        } catch (JSONException e) {
            respondException(response, e);
        }
    }
View Full Code Here

            writer.array();
            for (Column column : project.columnModel.columns) {
                writer.object();
                    write(project, column, writer);
                writer.endObject();
            }
            writer.endArray();
           
            //Refine.log("Obtained columns info in " + (System.currentTimeMillis() - start) + "ms");
        } catch (Exception e) {
View Full Code Here

                writer.object();
                writer.key("code"); writer.value("ok");
                writer.key("historyEntry"); historyEntry.write(writer, options);
                writer.key("cell"); process.newCell.write(writer, options);
                writer.key("pool"); pool.write(writer, options);
                writer.endObject();
            } else {
                respond(response, "{ \"code\" : \"pending\" }");
            }
        } catch (Exception e) {
            respondException(response, e);
View Full Code Here

                    writer.key(modelName);
                   
                    project.overlayModels.get(modelName).write(writer, options);
                }
            }
            writer.endObject();
           
            writer.key("scripting"); writer.object();
            for (String languagePrefix : MetaParser.getLanguagePrefixes()) {
                LanguageInfo info = MetaParser.getLanguageInfo(languagePrefix);
               
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.