Package javax.json

Interface JsonValue

    • Method Detail

      • asJsonObject

        🡅  🡇     🗕  🗗  🗖
        default JsonObject asJsonObject()
        Return the JsonValue as a JsonObject
        Returns:
        the JsonValue as a JsonObject
        Throws:
        java.lang.ClassCastException - if the JsonValue is not a JsonObject
        Since:
        1.1
        Code:
        Exact Method Body:
         return JsonObject.class.cast(this);
        
      • asJsonArray

        🡅  🡇     🗕  🗗  🗖
        default JsonArray asJsonArray()
        Return the JsonValue as a JsonArray
        Returns:
        the JsonValue as a JsonArray
        Throws:
        java.lang.ClassCastException - if the JsonValue is not a JsonArray
        Since:
        1.1
        Code:
        Exact Method Body:
         return JsonArray.class.cast(this);
        
      • toString

        🡅     🗕  🗗  🗖
        java.lang.String toString()
        Returns JSON text for this JSON value.
        Overrides:
        toString in class java.lang.Object
        Returns:
        JSON text