Examples of endObject()


Examples of org.apache.jackrabbit.oak.commons.json.JsopBuilder.endObject()

            in.close();
            String name = f.substring(parent.length());
            listing.key(name).value(id);
            listing.newline();
        }
        listing.endObject();
        String l = listing.toString();
        String id = store.writeBlob(new ByteArrayInputStream(l.getBytes("UTF-8")));
        return id;
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.commons.json.JsopStream.endObject()

            // TODO use a better way to notify there are more children
            json.key(":childNodeCount").value(Long.MAX_VALUE);
        } else {
            json.key(":childNodeCount").value(c.children.size());
        }
        json.endObject();
        return json.toString();
    }

    @Override
    public String commit(String rootPath, String jsonDiff, String baseRevId,
View Full Code Here

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

        if (properties.size() > 0) {
            json.key("prop").object();
            for (String k : properties.keySet()) {
                json.key(k).value(getPropertyAsString(k));
            }
            json.endObject();
        }
        return json.toString();
    }
   
    public static DocumentNodeState fromString(DocumentNodeStore store, String s) {
View Full Code Here

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

    for (final DebugInfo part : parts.subList(2, parts.size())) {
      jsonStreamWriter.separator()
          .name(part.getName().toLowerCase(Locale.ROOT));
      part.appendJson(jsonStreamWriter);
    }
    jsonStreamWriter.endObject()
        .endObject();
    writer.flush();
    csb.closeWrite();
    return csb.getInputStream();
  }
View Full Code Here

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

                if (!properties.isEmpty()) {
                    Resource nodeRes = resolver.getResource(path);
                    dumpProperties(w, nodeRes, properties);
                }

                w.endObject();


                count--;
            }
            w.endArray();
View Full Code Here

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

            w.object();
            for (Map.Entry<String, String> e : data.entrySet()) {
                w.key(e.getKey());
                w.value(e.getValue());
            }
            w.endObject();

        } catch (JSONException jse) {
            out.write(jse.toString());

        } finally {
View Full Code Here

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

            writer.object();
            writer.key("status").value(status ? "OK" : "FAILURE");
            if (!StringUtils.isEmpty(message)) {
                writer.key("message").value(message);
            }
            writer.endObject();
        } catch (JSONException e) {
            // never happens
            throw new RuntimeException(e);
        }
    }
View Full Code Here

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

                w.object();
                w.key("info");
                w.value("Background job information");
                w.key("jobStreamPath");
                w.value(streamPath);
                w.endObject();
            } catch (JSONException e) {
                throw (IOException)new IOException("JSONException in " + getClass().getSimpleName()).initCause(e);
            }
        }
    }
View Full Code Here

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

            String mode = determineMode(sef.getExtensions());
            if(mode != null){
                jw.key("mode").value(mode);
            }

            jw.endObject();
        }

        jw.endArray();
        return sw.toString();
    }
View Full Code Here

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

            w.key("info").value("Requested state change");
            w.key(PARAM_STATE).value(desiredState.toString());
            w.key("path").value(j.getPath());
            w.key("currentState").value(newState);
            w.key("stateChanged").value(newState != oldState);
            w.endObject();
        } catch(JSONException je) {
            throw new ServletException("JSONException in doPost", 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.