com.day.cq.commons
Class TidyJsonItemWriter

java.lang.Object
  extended by org.apache.sling.commons.json.jcr.JsonItemWriter
      extended by com.day.cq.commons.TidyJsonItemWriter

public class TidyJsonItemWriter
extends org.apache.sling.commons.json.jcr.JsonItemWriter

Extension of the JsonItemWriter that uses a TidyJSONWriter.


Field Summary
 
Fields inherited from class org.apache.sling.commons.json.jcr.JsonItemWriter
DATE_FORMAT_LOCALE, ECMA_DATE_FORMAT
 
Constructor Summary
TidyJsonItemWriter(Set<String> propertyNamesToIgnore)
          
 
Method Summary
 void dump(NodeIterator it, Writer out)
          
 void dump(Node node, Writer w, int maxRecursionLevels)
          
 void dump(Property p, Writer w)
          
 boolean isTidy()
          Checks if the output is nicely formatted.
 void setTidy(boolean tidy)
          Controls if output should be nicely formatted.
 
Methods inherited from class org.apache.sling.commons.json.jcr.JsonItemWriter
dump, dump, dumpSingleNode, dumpValue, format, recursionLevelActive, writeProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TidyJsonItemWriter

public TidyJsonItemWriter(Set<String> propertyNamesToIgnore)

Method Detail

isTidy

public boolean isTidy()
Checks if the output is nicely formatted.

Returns:
true if nicely formatted

setTidy

public void setTidy(boolean tidy)
Controls if output should be nicely formatted.

Parameters:
tidy - true to nicely format.

dump

public void dump(Node node,
                 Writer w,
                 int maxRecursionLevels)
          throws RepositoryException,
                 org.apache.sling.commons.json.JSONException

Overrides:
dump in class org.apache.sling.commons.json.jcr.JsonItemWriter
Throws:
RepositoryException
org.apache.sling.commons.json.JSONException

dump

public void dump(NodeIterator it,
                 Writer out)
          throws RepositoryException,
                 org.apache.sling.commons.json.JSONException

Overrides:
dump in class org.apache.sling.commons.json.jcr.JsonItemWriter
Throws:
RepositoryException
org.apache.sling.commons.json.JSONException

dump

public void dump(Property p,
                 Writer w)
          throws org.apache.sling.commons.json.JSONException,
                 ValueFormatException,
                 RepositoryException

Overrides:
dump in class org.apache.sling.commons.json.jcr.JsonItemWriter
Throws:
org.apache.sling.commons.json.JSONException
ValueFormatException
RepositoryException


Copyright © 2008 Day Management AG. All Rights Reserved.