Class JsonBoolean

java.lang.Object
com.oorian.json.JsonValue
com.oorian.json.JsonBoolean

public class JsonBoolean extends JsonValue
Represents a JSON boolean value (true or false).

JsonBoolean wraps a Java Boolean and provides JSON serialization that outputs the JSON literals true or false.

  • Constructor Details

    • JsonBoolean

      public JsonBoolean(Boolean value)
      Creates a new JsonBoolean with the specified value.
      Parameters:
      value - the boolean value.
  • Method Details

    • getValue

      public Boolean getValue()
      Returns the underlying boolean value.
      Returns:
      the Boolean value.
    • toJsonString

      public String toJsonString()
      Description copied from class: JsonValue
      Returns this value serialized as a JSON string.
      Specified by:
      toJsonString in class JsonValue
      Returns:
      the JSON string representation.