public enum JsonToken extends Enum<JsonToken>
| 枚举常量和说明 |
|---|
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.
|
public static final JsonToken BEGIN_ARRAY
JsonWriter.beginArray()
and read using JsonReader.beginArray().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 JSON-encoded value has no more
tokens.public static JsonToken[] values()
for (JsonToken c : JsonToken.values()) System.out.println(c);
public static JsonToken valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值