Interface | Description |
---|---|
JsonGenerator |
Writes JSON data to an output source in a streaming way.
|
JsonGeneratorFactory |
Factory to create
JsonGenerator instances. |
JsonLocation |
Provides the location information of a JSON event in an input source.
|
JsonParser |
Provides forward, read-only access to JSON data in a streaming way.
|
JsonParserFactory |
Factory for creating
JsonParser instances. |
Class | Description |
---|---|
JsonCollectors |
This class contains some implementations of
java.util.stream.Collector for accumulating
JsonValue s into JsonArray and JsonObject . |
Enum | Description |
---|---|
JsonParser.Event |
An event from
JsonParser . |
Exception | Description |
---|---|
JsonGenerationException |
JsonGenerationException indicates an incorrect JSON is
being generated. |
JsonParsingException |
JsonParsingException is used when an incorrect JSON is
being parsed. |
The streaming API consists of the interfaces
JsonParser
and
JsonGenerator
. The interface JsonParser
contains methods to parse JSON in a streaming way. The interface
JsonGenerator
contains methods to write JSON to an output source
in a streaming way.
JsonParser
provides forward, read-only access to JSON data using the
pull parsing programming model. In this model the application code controls
the thread and calls methods in the parser interface to move the parser
forward or to obtain JSON data from the current state of the parser.
JsonGenerator
provides methods to write JSON to an output source.
The generator writes name/value pairs in JSON objects and values in JSON
arrays.
The streaming API is a low-level API designed to process large amounts of JSON data efficiently. Other JSON frameworks (such as JSON binding) can be implemented using this API.
Copyright © 1996-2017, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.