public class JsonString extends JsonElement
Represents a JSON string element.
Modifier and Type | Field and Description |
---|---|
static JsonString |
empty |
TYPE_ARRAY, TYPE_BOOLEAN, TYPE_NUMBER, TYPE_OBJECT, TYPE_STRING
Modifier and Type | Method and Description |
---|---|
int |
getType()
Return JsonElement.TYPE_STRING.
|
java.lang.String |
getValue()
Return value of this element.
|
static JsonString |
of(java.lang.String value)
Return a string element with the specified
value . |
java.lang.String |
toString()
Return the string
JsonString.value in JSON format. |
applyVersion, format, parse, parseArray, parseObject, parseOptimized
public static final JsonString empty
public int getType()
Return JsonElement.TYPE_STRING.
getType
in class JsonElement
public java.lang.String getValue()
Return value of this element.
public static JsonString of(java.lang.String value)
Return a string element with the specified value
.
value
- String value.value
.public java.lang.String toString()
Return the string JsonString.value
in JSON format.
toString
in class JsonElement
JsonString.value
in JSON format.