Token

A structure, name, or value type in a JSON-encoded string.

enum Token

Entries

BEGIN_ARRAY
Link copied to clipboard

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

END_ARRAY
Link copied to clipboard

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

BEGIN_OBJECT
Link copied to clipboard

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

END_OBJECT
Link copied to clipboard

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

NAME
Link copied to clipboard

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

STRING
Link copied to clipboard

A JSON string.

NUMBER
Link copied to clipboard

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

BOOLEAN
Link copied to clipboard

A JSON {@code true} or {@code false} .

NULL
Link copied to clipboard

A JSON {@code null} .

END_DOCUMENT
Link copied to clipboard

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