Examples of endArray()


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

            if (children.size() > 0) {
                json.key("children").array();
                for (String c : children) {
                    json.value(c);
                }
                json.endArray();
            }
            return json.toString();           
        }
       
        public static Children fromString(String s) {
View Full Code Here

Examples of org.apache.olingo.odata2.core.ep.util.JsonStreamWriter.endArray()

          jsonStreamWriter.separator();
        }
        jsonStreamWriter.stringValue(info.getEntitySetUri().toASCIIString());
      }

      jsonStreamWriter.endArray()
          .endObject()
          .endObject();
    } catch (final IOException e) {
      throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass()
          .getSimpleName()), e);
View Full Code Here

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

                writer.array();
                while (allowedLevel >= 0) {
                    writer.value(r.getResourceMetadata().getResolutionPath() + "." + tidyUrl + allowedLevel + ".json");
                    allowedLevel--;
                }
                writer.endArray();
            }
        } catch (JSONException je) {
            reportException(je);
        }
    }
View Full Code Here

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

                w.endObject();


                count--;
            }
            w.endArray();
        } catch (JSONException je) {
            throw wrapException(je);
        }
    }
View Full Code Here

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

            }

            jw.endObject();
        }

        jw.endArray();
        return sw.toString();
    }

    private String determineMode(List<String> extensions) {
        if(extensions.contains("groovy")){
View Full Code Here

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

                final JSONWriter w = new JSONWriter(response.getWriter());
                w.setTidy(true);
                out.write("var statsData = ");
                w.array();
                dumpStatsData(request.getResource(), w, layers);
                w.endArray();
                out.flush();
                out.write(";\n");
            }
           
            // Output the layers array in JSON
View Full Code Here

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

                out.write("var layers = ");
                w.array();
                for(String layer : layers) {
                    w.value(layer);
                };
                w.endArray();
                out.write(";");
            }
           
        } catch(JSONException je) {
            throw new ServletException("JSONException in doGet", je);
View Full Code Here

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

                        writer.object();
                        writer.key("text").value(item.getTitle());
                        writer.key("value").value(item.getValue());
                        writer.endObject();
                    }
                    writer.endArray();
                    writer.endObject();
                    return (AdapterType) new ByteArrayInputStream(buffer.toString().getBytes("UTF-8"));
                } catch (Exception e) {
                    log.warn("Unable to generate JSON object.", e);
                    return null;
View Full Code Here

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

                        jsonWriter.value(path);
                    }
                }

            }
            jsonWriter.endArray();
        } catch (JSONException e) {
            throw new ServletException("Unable to generate JSON result", e);
        }
    }
View Full Code Here

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

                }

                w.endObject();
                count--;
            }
            w.endArray();
        } catch (JSONException je) {
            throw wrapException(je);
        }
    }
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.