Interface JsonPrimitive

All Superinterfaces:
JsonNode

public interface JsonPrimitive extends JsonNode
Interface that represents a JSON value.
  • Method Details

    • isValue

      default boolean isValue()
      Specified by:
      isValue in interface JsonNode
      Returns:
      True if this JsonNode is an instance of JsonPrimitive.
    • isBoolean

      boolean isBoolean()
      Returns:
      Whether the JsonPrimitive represents a boolean.
    • getAsBoolean

      boolean getAsBoolean()
      Returns:
      The boolean value contained in the JsonPrimitive.
    • isNumber

      boolean isNumber()
      Returns:
      Whether the JsonPrimitive represents a number.
    • getAsDouble

      double getAsDouble()
      Returns:
      The double value contained in the JsonPrimitive.
    • getAsFloat

      float getAsFloat()
      Returns:
      The float value contained in the JsonPrimitive.
    • getAsInt

      int getAsInt()
      Returns:
      The int value contained in the JsonPrimitive.
    • getAsLong

      long getAsLong()
      Returns:
      The long value contained in the JsonPrimitive.
    • getAsShort

      short getAsShort()
      Returns:
      The short value contained in the JsonPrimitive.
    • isString

      boolean isString()
      Returns:
      Whether the JsonPrimitive represents a number.
    • getAsString

      String getAsString()
      Returns:
      The String value contained in the JsonPrimitive.