Class JsonToText


  • public class JsonToText
    extends Object
    • Constructor Detail

      • JsonToText

        public JsonToText()
    • Method Detail

      • options

        public JsonToText.Options options()
        Return an Options object with default values
      • prettyPrint

        public String prettyPrint​(jakarta.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​(jakarta.json.JsonArray ja,
                                  JsonToText.Options opt)
        Pretty-print a JSONArray