Interface JsonObject

All Superinterfaces:
JsonElement

public interface JsonObject extends JsonElement
A generic object/map
Author:
Riccardo Balbo
  • Method Details

    • getAsJsonArray

      JsonArray getAsJsonArray(String string)
      Returns the object property as a String
      Parameters:
      string - name of the property
      Returns:
      the string
    • getAsJsonObject

      JsonObject getAsJsonObject(String string)
      Returns the object property as a JsonObject
      Parameters:
      string - name of the property
      Returns:
      the JsonObject
    • has

      boolean has(String string)
      Check if the object has a property
      Parameters:
      string - name of the property
      Returns:
      true if it exists, false otherwise
    • get

      JsonElement get(String string)
      Returns the object property as generic element
      Parameters:
      string - name of the property
      Returns:
      the element
    • entrySet

      Returns the object's key-value pairs
      Returns:
      an array of key-value pairs
    • getAsJsonPrimitive

      JsonPrimitive getAsJsonPrimitive(String string)
      Returns the object property as a wrapped primitive
      Parameters:
      string - name of the property
      Returns:
      the wrapped primitive