to top
Android APIs
public final enum

JsonToken

extends Enum<E extends  Enum<E>>
java.lang.Object
   ↳ java.lang.Enum<E extends java.lang.Enum<E>>
     ↳ android.util.JsonToken

Class Overview

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

Summary

Enum Values
JsonToken  BEGIN_ARRAY  The opening of a JSON array. 
JsonToken  BEGIN_OBJECT  The opening of a JSON object. 
JsonToken  BOOLEAN  A JSON true or false
JsonToken  END_ARRAY  The closing of a JSON array. 
JsonToken  END_DOCUMENT  The end of the JSON stream. 
JsonToken  END_OBJECT  The closing of a JSON object. 
JsonToken  NAME  A JSON property name. 
JsonToken  NULL  A JSON null
JsonToken  NUMBER  A JSON number represented in this API by a Java double, long, or int
JsonToken  STRING  A JSON string. 
Public Methods

? Examples
static JsonToken valueOf( String name)

? Examples
final static JsonToken[] values()
[Expand]
Inherited Methods
From class java.lang.Enum
From class java.lang.Object
From interface java.lang.Comparable

Enum Values

public static final JsonToken BEGIN_ARRAY

The opening of a JSON array. Written using beginObject() and read using beginObject().

public static final JsonToken BEGIN_OBJECT

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

public static final JsonToken BOOLEAN

A JSON true or false.

public static final JsonToken END_ARRAY

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

public static final JsonToken END_DOCUMENT

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

public static final JsonToken END_OBJECT

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

public static final JsonToken NAME

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

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.

Public Methods

public static JsonToken valueOf (String name)

Added in API level 11

public static final JsonToken[] values ()

Added in API level 11

No examples for this method.
Frequently called with: [Clear]
Portions of this page are reproduced from work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. The original page is available here.