Added in API level 11

JsonToken


class JsonToken
kotlin.Any
   ↳ kotlin.Enum<android.util.JsonToken>
   ↳ android.util.JsonToken

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

Summary

Enum values

The opening of a JSON array.

The opening of a JSON object.

A JSON true or false.

The closing of a JSON array.

The end of the JSON stream.

The closing of a JSON object.

A JSON property name.

A JSON null.

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

A JSON string.

Enum values

BEGIN_ARRAY

Added in API level 11
enum val BEGIN_ARRAY : JsonToken

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

BEGIN_OBJECT

Added in API level 11
enum val BEGIN_OBJECT : JsonToken

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

BOOLEAN

Added in API level 11
enum val BOOLEAN : JsonToken

A JSON true or false.

END_ARRAY

Added in API level 11
enum val END_ARRAY : JsonToken

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

END_DOCUMENT

Added in API level 11
enum val END_DOCUMENT : JsonToken

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

END_OBJECT

Added in API level 11
enum val END_OBJECT : JsonToken

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

NAME

Added in API level 11
enum val NAME : JsonToken

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

NULL

Added in API level 11
enum val NULL : JsonToken

A JSON null.

NUMBER

Added in API level 11
enum val NUMBER : JsonToken

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

STRING

Added in API level 11
enum val STRING : JsonToken

A JSON string.