Top Description Fields Constructors Methods
com.google.gson.stream

public final Enum JsonToken

extends Enum<JsonToken>
Class Inheritance

A structure, name or value type in a JSON-encoded string.
Author
Jesse Wilson
Since
1.6

Field Summary

Modifier and TypeField and Description
public static final JsonToken
BEGIN_ARRAY

The opening of a JSON array.

public static final JsonToken
BEGIN_OBJECT

The opening of a JSON object.

public static final JsonToken
BOOLEAN

A JSON true or false.

public static final JsonToken
END_ARRAY

The closing of a JSON array.

public static final JsonToken
END_DOCUMENT

The end of the JSON stream.

public static final JsonToken
END_OBJECT

The closing of a JSON object.

public static final JsonToken
NAME

A JSON property name.

public static final JsonToken
NULL

A JSON null.

public static final JsonToken
NUMBER

A JSON number represented in this API by a Java double, long, or int.

public static final JsonToken
STRING

A JSON string.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static JsonToken
public static JsonToken[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

BEGIN_ARRAYback to summary
public static final JsonToken BEGIN_ARRAY

The opening of a JSON array. Written using JsonWriter#beginArray and read using JsonReader#beginArray.

BEGIN_OBJECTback to summary
public static final JsonToken BEGIN_OBJECT

The opening of a JSON object. Written using JsonWriter#beginObject and read using JsonReader#beginObject.

BOOLEANback to summary
public static final JsonToken BOOLEAN

A JSON true or false.

END_ARRAYback to summary
public static final JsonToken END_ARRAY

The closing of a JSON array. Written using JsonWriter#endArray and read using JsonReader#endArray.

END_DOCUMENTback to summary
public static final JsonToken END_DOCUMENT

The end of the JSON stream. This sentinel value is returned by JsonReader#peek() to signal that the JSON-encoded value has no more tokens.

END_OBJECTback to summary
public static final JsonToken END_OBJECT

The closing of a JSON object. Written using JsonWriter#endObject and read using JsonReader#endObject.

NAMEback to summary
public static final JsonToken NAME

A JSON property name. Within objects, tokens alternate between names and their values. Written using JsonWriter#name and read using JsonReader#nextName

NULLback to summary
public static final JsonToken NULL

A JSON null.

NUMBERback to summary
public static final JsonToken NUMBER

A JSON number represented in this API by a Java double, long, or int.

STRINGback to summary
public static final JsonToken STRING

A JSON string.

Constructor Detail

JsonTokenback to summary
private JsonToken()

Method Detail

valueOfback to summary
public static JsonToken valueOf(String name)
valuesback to summary
public static JsonToken[] values()