Class JsonItemWriter
- java.lang.Object
 - 
- org.apache.sling.commons.json.jcr.JsonItemWriter
 
 
- 
- Direct Known Subclasses:
 TidyJsonItemWriter
@Deprecated public class JsonItemWriter extends java.lang.ObjectDeprecated.Dumps JCR Items as JSON data. The dump methods are threadsafe. 
- 
- 
Field Summary
Fields Modifier and Type Field Description static java.util.LocaleDATE_FORMAT_LOCALEDeprecated.Used to format date valuesstatic java.lang.StringECMA_DATE_FORMATDeprecated.Used to format date values 
- 
Constructor Summary
Constructors Constructor Description JsonItemWriter(java.util.Set<java.lang.String> propertyNamesToIgnore)Deprecated.Create a JsonItemWriter 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voiddump(javax.jcr.NodeIterator it, java.io.Writer out)Deprecated.Dump all Nodes of given NodeIterator in JSONvoiddump(javax.jcr.Node node, java.io.Writer w, int maxRecursionLevels)Deprecated.Dump given node in JSON, optionally recursing into its child nodesvoiddump(javax.jcr.Node node, java.io.Writer w, int maxRecursionLevels, boolean tidy)Deprecated.the tidy mode was removed from the json libraryvoiddump(javax.jcr.Property p, java.io.Writer w)Deprecated.Dump given property in JSONstatic java.lang.Stringformat(java.util.Calendar date)Deprecated. 
 - 
 
- 
- 
Field Detail
- 
ECMA_DATE_FORMAT
public static final java.lang.String ECMA_DATE_FORMAT
Deprecated.Used to format date values- See Also:
 - Constant Field Values
 
 
- 
DATE_FORMAT_LOCALE
public static final java.util.Locale DATE_FORMAT_LOCALE
Deprecated.Used to format date values 
 - 
 
- 
Constructor Detail
- 
JsonItemWriter
public JsonItemWriter(java.util.Set<java.lang.String> propertyNamesToIgnore)
Deprecated.Create a JsonItemWriter- Parameters:
 propertyNamesToIgnore- if not null, a property having a name from this set of values is ignored. TODO we should use a filtering interface to make the selection of which Nodes and Properties to dump more flexible.
 
 - 
 
- 
Method Detail
- 
dump
public void dump(javax.jcr.NodeIterator it, java.io.Writer out) throws javax.jcr.RepositoryException, JSONExceptionDeprecated.Dump all Nodes of given NodeIterator in JSON- Throws:
 JSONExceptionjavax.jcr.RepositoryException
 
- 
dump
public void dump(javax.jcr.Node node, java.io.Writer w, int maxRecursionLevels) throws javax.jcr.RepositoryException, JSONExceptionDeprecated.Dump given node in JSON, optionally recursing into its child nodes- Throws:
 javax.jcr.RepositoryExceptionJSONException
 
- 
dump
@Deprecated public void dump(javax.jcr.Node node, java.io.Writer w, int maxRecursionLevels, boolean tidy) throws javax.jcr.RepositoryException, JSONExceptionDeprecated.the tidy mode was removed from the json libraryDump given node in JSON, optionally recursing into its child nodes- Parameters:
 tidy- iftruethe json dump is nicely formatted- Throws:
 javax.jcr.RepositoryExceptionJSONException
 
- 
dump
public void dump(javax.jcr.Property p, java.io.Writer w) throws JSONException, javax.jcr.ValueFormatException, javax.jcr.RepositoryExceptionDeprecated.Dump given property in JSON- Throws:
 JSONExceptionjavax.jcr.ValueFormatExceptionjavax.jcr.RepositoryException
 
- 
format
public static java.lang.String format(java.util.Calendar date)
Deprecated. 
 - 
 
 -