Package io.avaje.jsonb
Enum JsonReader.Token
- java.lang.Object
-
- java.lang.Enum<JsonReader.Token>
-
- io.avaje.jsonb.JsonReader.Token
-
- All Implemented Interfaces:
Serializable
,Comparable<JsonReader.Token>
- Enclosing interface:
- JsonReader
public static enum JsonReader.Token extends Enum<JsonReader.Token>
A structure, name, or value type in a JSON-encoded string.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BEGIN_ARRAY
The opening of a JSON array.BEGIN_OBJECT
The opening of a JSON object.BOOLEAN
A JSONtrue
orfalse
.NULL
A JSONnull
.NUMBER
A JSON number represented in this API by a Javadouble
,long
, orint
.STRING
A JSON string.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static JsonReader.Token
valueOf(String name)
Returns the enum constant of this type with the specified name.static JsonReader.Token[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BEGIN_ARRAY
public static final JsonReader.Token BEGIN_ARRAY
The opening of a JSON array. Written usingJsonWriter.beginArray()
and read usingJsonReader.beginArray()
.
-
BEGIN_OBJECT
public static final JsonReader.Token BEGIN_OBJECT
The opening of a JSON object. Written usingJsonWriter.beginObject()
and read usingJsonReader.beginObject()
.
-
STRING
public static final JsonReader.Token STRING
A JSON string.
-
NUMBER
public static final JsonReader.Token NUMBER
A JSON number represented in this API by a Javadouble
,long
, orint
.
-
BOOLEAN
public static final JsonReader.Token BOOLEAN
A JSONtrue
orfalse
.
-
NULL
public static final JsonReader.Token NULL
A JSONnull
.
-
-
Method Detail
-
values
public static JsonReader.Token[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (JsonReader.Token c : JsonReader.Token.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JsonReader.Token valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
-