Package io.sentry.vendor.gson.stream
Enum Class JsonToken
- All Implemented Interfaces:
Serializable
,Comparable<JsonToken>
,Constable
A structure, name or value type in a JSON-encoded string.
- Since:
- 1.6
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe opening of a JSON array.The opening of a JSON object.A JSONtrue
orfalse
.The closing of a JSON array.The end of the JSON stream.The closing of a JSON object.A JSON property name.A JSONnull
.A JSON number represented in this API by a Javadouble
,long
, orint
.A JSON string. -
Method Summary
-
Enum Constant Details
-
BEGIN_ARRAY
The opening of a JSON array. Written usingJsonWriter.beginArray()
and read usingJsonReader.beginArray()
. -
END_ARRAY
The closing of a JSON array. Written usingJsonWriter.endArray()
and read usingJsonReader.endArray()
. -
BEGIN_OBJECT
The opening of a JSON object. Written usingJsonWriter.beginObject()
and read usingJsonReader.beginObject()
. -
END_OBJECT
The closing of a JSON object. Written usingJsonWriter.endObject()
and read usingJsonReader.endObject()
. -
NAME
A JSON property name. Within objects, tokens alternate between names and their values. Written usingJsonWriter.name(java.lang.String)
and read usingJsonReader.nextName()
-
STRING
A JSON string. -
NUMBER
A JSON number represented in this API by a Javadouble
,long
, orint
. -
BOOLEAN
A JSONtrue
orfalse
. -
NULL
A JSONnull
. -
END_DOCUMENT
The end of the JSON stream. This sentinel value is returned byJsonReader.peek()
to signal that the JSON-encoded value has no more tokens.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-