Java Reference
In-Depth Information
We only saw three of the possible values we can obtain when sequentially reading
JSON data by invoking JsonParser.next() . The following table lists all of the
possible values:
Event enum Value
Description
Event.START_OBJECT
Indicates the beginning of a JSON object
Event.END_OBJECT
Indicates the end of a JSON object
Event.KEY_NAME
Indicates the name of a JSON property
Event.VALUE_STRING
Indicates a String value was read
Event.VALUE_NUMBER
Indicates a numeric value was read
Event.VALUE_TRUE
Indicates a Boolean true value was read
Event.VALUE_FALSE
Indicates a Boolean false value was read
Event.VALUE_NULL
Indicates that a null value was read
Event.VALUE_START_ARRAY
Indicates that the start of an array was read
EVENT.VALUE_END_ARRAY
Indicates that the end of an array was read
Summary
In this chapter we covered JSON-P, which is a new addition to the Java EE
specification. We covered how to generate and parse data using the simple JSON-P
object model API, and then we switched our attention to the more performant and
memory-efficient JSON-P streaming API, covering JSON data manipulation with
this JSON-P API as well.
Search WWH ::




Custom Search