Class JsonToText
- java.lang.Object
-
- org.apache.sling.servlets.get.impl.util.JsonToText
-
public class JsonToText extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJsonToText.OptionsRendering options
-
Constructor Summary
Constructors Constructor Description JsonToText()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonToText.Optionsoptions()Return an Options object with default valuesStringprettyPrint(javax.json.JsonArray ja, JsonToText.Options opt)Pretty-print a JSONArrayStringprettyPrint(javax.json.JsonObject jo, JsonToText.Options opt)Make a prettyprinted JSON text of this JSONObject.
-
-
-
Method Detail
-
options
public JsonToText.Options options()
Return an Options object with default values
-
prettyPrint
public String prettyPrint(javax.json.JsonObject jo, JsonToText.Options opt)
Make a prettyprinted JSON text of this JSONObject.Warning: This method assumes that the data structure is acyclical.
- Returns:
- a printable, displayable, transmittable
representation of the object, beginning
with
{(left brace) and ending with}(right brace). - Throws:
IllegalArgumentException- If the object contains an invalid number.
-
prettyPrint
public String prettyPrint(javax.json.JsonArray ja, JsonToText.Options opt)
Pretty-print a JSONArray
-
-