public class JSONPrettyPrint extends JSONAbstractVisitor
Constructor and Description |
---|
JSONPrettyPrint() |
JSONPrettyPrint(char tab) |
Modifier and Type | Method and Description |
---|---|
void |
enterJSONArray(JSONArray<? extends JSON> arr) |
void |
enterJSONObject(JSONObject obj) |
void |
exitJSONArray(JSONArray<? extends JSON> arr) |
void |
exitJSONObject(JSONObject obj) |
java.lang.String |
prettyPrint()
Returns the visited JSON object as formatted code.
|
void |
visitJSONBoolean(JSONBoolean el) |
void |
visitJSONInteger(JSONInteger el) |
void |
visitJSONProperty(JSONObject.Property prop) |
void |
visitJSONString(JSONString el) |
public JSONPrettyPrint()
public JSONPrettyPrint(char tab)
public void visitJSONString(JSONString el)
visitJSONString
in interface JSONVisitor
visitJSONString
in class JSONAbstractVisitor
public void visitJSONBoolean(JSONBoolean el)
visitJSONBoolean
in interface JSONVisitor
visitJSONBoolean
in class JSONAbstractVisitor
public void visitJSONInteger(JSONInteger el)
visitJSONInteger
in interface JSONVisitor
visitJSONInteger
in class JSONAbstractVisitor
public void enterJSONArray(JSONArray<? extends JSON> arr)
enterJSONArray
in interface JSONVisitor
enterJSONArray
in class JSONAbstractVisitor
public void exitJSONArray(JSONArray<? extends JSON> arr)
exitJSONArray
in interface JSONVisitor
exitJSONArray
in class JSONAbstractVisitor
public void enterJSONObject(JSONObject obj)
enterJSONObject
in interface JSONVisitor
enterJSONObject
in class JSONAbstractVisitor
public void visitJSONProperty(JSONObject.Property prop)
visitJSONProperty
in interface JSONVisitor
visitJSONProperty
in class JSONAbstractVisitor
public void exitJSONObject(JSONObject obj)
exitJSONObject
in interface JSONVisitor
exitJSONObject
in class JSONAbstractVisitor
public java.lang.String prettyPrint()