| Package | Description |
|---|---|
| org.apache.sling.commons.json.io | |
| org.apache.sling.commons.json.jcr |
| Modifier and Type | Class and Description |
|---|---|
class |
JSONStringer
JSONStringer provides a quick and convenient way of producing JSON text.
|
| Modifier and Type | Method and Description |
|---|---|
JSONWriter |
JSONWriter.array()
Begin appending a new array.
|
JSONWriter |
JSONWriter.endArray()
End an array.
|
JSONWriter |
JSONWriter.endObject()
End an object.
|
JSONWriter |
JSONWriter.key(String s)
Append a key.
|
JSONWriter |
JSONWriter.object()
Begin appending a new object.
|
JSONWriter |
JSONWriter.value(boolean b)
Append either the value
true or the value
false. |
JSONWriter |
JSONWriter.value(double d)
Append a double value.
|
JSONWriter |
JSONWriter.value(long l)
Append a long value.
|
JSONWriter |
JSONWriter.value(Object o)
Append an object value.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
JsonItemWriter.dump(javax.jcr.Node node,
JSONWriter w,
int currentRecursionLevel,
int maxRecursionLevels)
Dump given node in JSON, optionally recursing into its child nodes
|
protected void |
JsonItemWriter.dumpSingleNode(javax.jcr.Node n,
JSONWriter w,
int currentRecursionLevel,
int maxRecursionLevels)
Dump a single node
|
protected void |
JsonItemWriter.dumpValue(JSONWriter w,
javax.jcr.Value v)
Writes the given value to the JSON writer. currently the following
conversions are done:
JSR Property Type
JSON Value Type
BINARY
always 0 as long
DATE
converted date string as defined by ECMA
BOOLEAN
boolean
LONG
long
DOUBLE
double
all other
string
1 Currently not implemented and uses 0 as default.
|
protected void |
JsonItemWriter.writeProperty(JSONWriter w,
javax.jcr.Property p)
Write a single property
|
Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.