Package com.aspectran.utils.json
Enum Class JsonToken
- All Implemented Interfaces:
Serializable
,Comparable<JsonToken>
,Constable
This class is a clone of com.google.gson.stream.JsonToken
A structure, name or value type in a JSON-encoded string.- Author:
- Jesse Wilson
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum 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. -
END_ARRAY
The closing of a JSON array. -
BEGIN_OBJECT
The opening of a JSON object. -
END_OBJECT
The closing of a JSON object. -
NAME
A JSON property name. Within objects, tokens alternate between names and their values. -
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
-