javax.json.stream
Enum JsonParser.Event

java.lang.Object
  extended by java.lang.Enum<JsonParser.Event>
      extended by javax.json.stream.JsonParser.Event
All Implemented Interfaces:
Serializable, Comparable<JsonParser.Event>
Enclosing interface:
JsonParser

public static enum JsonParser.Event
extends Enum<JsonParser.Event>

Event for parser state while parsing the JSON


Enum Constant Summary
END_ARRAY
          Event for end of an array.
END_OBJECT
          Event for end of an object.
KEY_NAME
          Event for a name in name(key)/value pair of a JSON object.
START_ARRAY
          Event for start of a JSON array.
START_OBJECT
          Event for start of a JSON object.
VALUE_FALSE
          Event for a false value.
VALUE_NULL
          Event for a null value.
VALUE_NUMBER
          Event for a number value.
VALUE_STRING
          Event for JSON string value.
VALUE_TRUE
          Event for a true value.
 
Method Summary
static JsonParser.Event valueOf(String name)
          Returns the enum constant of this type with the specified name.
static JsonParser.Event[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

START_ARRAY

public static final JsonParser.Event START_ARRAY
Event for start of a JSON array. This event indicates '[' is parsed.


START_OBJECT

public static final JsonParser.Event START_OBJECT
Event for start of a JSON object. This event indicates '{' is parsed.


KEY_NAME

public static final JsonParser.Event KEY_NAME
Event for a name in name(key)/value pair of a JSON object. This event indicates that the key name is parsed. The name/key value itself can be accessed using JsonParser.getString()


VALUE_STRING

public static final JsonParser.Event VALUE_STRING
Event for JSON string value. This event indicates a string value in an array or object is parsed. The string value itself can be accessed using JsonParser.getString()


VALUE_NUMBER

public static final JsonParser.Event VALUE_NUMBER
Event for a number value. This event indicates a number value in an array or object is parsed. The number value itself can be accessed using JsonNumber methods


VALUE_TRUE

public static final JsonParser.Event VALUE_TRUE
Event for a true value. This event indicates a true value in an array or object is parsed.


VALUE_FALSE

public static final JsonParser.Event VALUE_FALSE
Event for a false value. This event indicates a false value in an array or object is parsed.


VALUE_NULL

public static final JsonParser.Event VALUE_NULL
Event for a null value. This event indicates a null value in an array or object is parsed.


END_OBJECT

public static final JsonParser.Event END_OBJECT
Event for end of an object. This event indicates '}' is parsed.


END_ARRAY

public static final JsonParser.Event END_ARRAY
Event for end of an array. This event indicates ']' is parsed.

Method Detail

values

public static JsonParser.Event[] 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 (JsonParser.Event c : JsonParser.Event.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static JsonParser.Event 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 name
NullPointerException - if the argument is null



Copyright © 2012 Oracle and/or its affiliates. All rights reserved.