class JsonString extends JsonValue
| Modifier and Type | Field and Description |
|---|---|
private String |
string |
TRANSFORM_LINE_LENGTH| Constructor and Description |
|---|
JsonString(String string) |
| Modifier and Type | Method and Description |
|---|---|
String |
asString()
Returns this JSON value as String, assuming that this value represents a JSON string.
|
boolean |
equals(Object object)
Indicates whether some other object is "equal to" this one according to the contract specified
in
Object.equals(Object). |
int |
hashCode() |
boolean |
isString()
Detects whether this value represents a JSON string.
|
(package private) void |
write(JsonWriter writer) |
private final String string
JsonString(String string)
void write(JsonWriter writer) throws IOException
write in class JsonValueIOExceptionpublic boolean isString()
JsonValuepublic String asString()
JsonValuepublic boolean equals(Object object)
JsonValueObject.equals(Object).
Two JsonValues are considered equal if and only if they represent the same JSON text. As a consequence, two given JsonObjects may be different even though they contain the same set of names with the same values, but in a different order.
Copyright © 2011–2016 David R. Smith. All rights reserved.