Package org.dominokit.jacksonapt.stream
Enum JsonToken
java.lang.Object
java.lang.Enum<JsonToken>
org.dominokit.jacksonapt.stream.JsonToken
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<JsonToken>,java.lang.constant.Constable
public enum JsonToken extends java.lang.Enum<JsonToken>
A structure, name or value type in a JSON-encoded string.
- Since:
- 1.6
- Version:
- $Id: $
- Author:
- Jesse Wilson
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>> -
Enum Constant Summary
Enum Constants Enum Constant Description BEGIN_ARRAYThe opening of a JSON array.BEGIN_OBJECTThe opening of a JSON object.BOOLEANA JSONtrueorfalse.END_ARRAYThe closing of a JSON array.END_DOCUMENTThe end of the JSON stream.END_OBJECTThe closing of a JSON object.NAMEA JSON property name.NULLA JSONnull.NUMBERA JSON number represented in this API by a Javadouble,long, orint.STRINGA JSON string. -
Method Summary
Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
-
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 JSONtrueorfalse. -
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 type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-