Class JsonValue

java.lang.Object
com.itextpdf.commons.json.JsonValue
Direct Known Subclasses:
JsonArray, JsonBoolean, JsonNull, JsonNumber, JsonObject, JsonString

public abstract class JsonValue extends Object
Class representing generic JSON value.
  • Constructor Details

    • JsonValue

      protected JsonValue()
      Creates a new JsonValue.
  • Method Details

    • fromJson

      public static JsonValue fromJson (String json)
      Parses string and creates JsonValue out of it.
      Parameters:
      json - string to parse
      Returns:
      JsonValue representing the input string
    • toJson

      public final String toJson()
      Converts this JsonValue into a string.
      Returns:
      string representing this JsonValue
    • toPrettifiedJson

      public final String toPrettifiedJson()
      Converts this JsonValue into a prettified JSON string with indentation and line breaks.
      Returns:
      prettified JSON string representing this JsonValue