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