Class JsonString

    • Method Detail

      • isString

        public boolean isString()
        Description copied from class: JsonValue
        Detects whether this value represents a JSON string.
        Overrides:
        isString in class JsonValue
        Returns:
        true if this value represents a JSON string
      • asString

        public String asString()
        Description copied from class: JsonValue
        Returns this JSON value as String, assuming that this value represents a JSON string. If this is not the case, an exception is thrown.
        Overrides:
        asString in class JsonValue
        Returns:
        the string represented by this value
      • equals

        public boolean equals​(Object object)
        Description copied from class: JsonValue
        Indicates whether some other object is "equal to" this one according to the contract specified in Object.equals(Object).

        Two JsonValues are considered equal if and only if they represent the same JSON text. As a consequence, two given JsonObjects may be different even though they contain the same set of names with the same values, but in a different order.

        Overrides:
        equals in class JsonValue
        Parameters:
        object - the reference object with which to compare
        Returns:
        true if this object is the same as the object argument; false otherwise