public static enum JsonReader.Token extends Enum<JsonReader.Token>
| Enum Constant and Description |
|---|
BEGIN_ARRAY
The opening of a JSON array.
|
BEGIN_OBJECT
The opening of a JSON object.
|
BOOLEAN
A JSON
true or false. |
END_ARRAY
The closing of a JSON array.
|
END_DOCUMENT
The end of the JSON stream.
|
END_OBJECT
The closing of a JSON object.
|
NAME
A JSON property name.
|
NULL
A JSON
null. |
NUMBER
A JSON number represented in this API by a Java
double, long, or int. |
STRING
A JSON string.
|
| Modifier and Type | Method and Description |
|---|---|
static JsonReader.Token |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static JsonReader.Token[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JsonReader.Token BEGIN_ARRAY
JsonWriter.beginArray()
and read using JsonReader.beginArray().public static final JsonReader.Token END_ARRAY
JsonWriter.endArray()
and read using JsonReader.endArray().public static final JsonReader.Token BEGIN_OBJECT
JsonWriter.beginObject()
and read using JsonReader.beginObject().public static final JsonReader.Token END_OBJECT
JsonWriter.endObject()
and read using JsonReader.endObject().public static final JsonReader.Token NAME
JsonWriter.name(java.lang.String) and read using JsonReader.nextName()public static final JsonReader.Token STRING
public static final JsonReader.Token NUMBER
double, long, or int.public static final JsonReader.Token BOOLEAN
true or false.public static final JsonReader.Token NULL
null.public static final JsonReader.Token END_DOCUMENT
JsonReader.peek() to signal that the JSON-encoded value has no more
tokens.public static JsonReader.Token[] values()
for (JsonReader.Token c : JsonReader.Token.values()) System.out.println(c);
public static JsonReader.Token valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2017. All Rights Reserved.