Class JsonString

java.lang.Object
name.martingeisse.grumpyjson.json_model.JsonElement
name.martingeisse.grumpyjson.json_model.JsonString

public final class JsonString extends JsonElement
This class represents JSON strings.
  • Method Details

    • of

      public static JsonString of(String value)
      Creates an instance of this class for the specified plain string value.
      Parameters:
      value - the string value
      Returns:
      the JSON string
    • getValue

      public String getValue()
      Getter method.
      Returns:
      the value of this JSON string
    • deserializerExpectsString

      public String deserializerExpectsString()
      Description copied from class: JsonElement
      If this JSON element is not a JSON string, this method throws a JsonDeserializationException, otherwise it returns the string value.
      Overrides:
      deserializerExpectsString in class JsonElement
      Returns:
      the string value
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object