See: Description
| Interface | Description |
|---|---|
| LimitFilter |
Filtering for structures during a parse.
|
| StructureCollector<OA,AA,OR,AR> |
Allows
JSONLimitBuilder to parameterize the creation and population
of object and array structures, null values, and creation of
a "finished" result type. |
| Class | Description |
|---|---|
| BuilderLimits |
Builder limits, based on similar limits used in some XML parsers.
|
| CollectionCollector |
Structure collector that creates
HashMap, ArrayList, and
null instances. |
| JSONCollector |
Structure collector that creates
JSONObject, JSONArray, and
JSONObject.NULL instances. |
| JSONLexer |
A
JSONLexer takes a source stream and extracts characters and tokens
from it. |
| JSONLimitBuilder |
Builds a JSON object model using events supplied from
JSONLimitStreamReader,
using secure principles derived from XML parsers. |
| JSONLimitStreamReader |
Reads a JSON document as a stream of JSON events, using secure principles
derived from XML parsers.
|
| JSONObjectBuilder |
Builds a JSON object model using events supplied from
JSONStreamReader. |
| JSONStreamReader |
Reads a JSON document as a stream of JSON events.
|
| Enum | Description |
|---|---|
| JSONLexer.Token |
Tokens that can be identified with at most one character lookahead.
|
| JSONStreamReader.ParseState |
States of the internal state machine.
|
A streaming parser implementation and related tools for JSON. Implements a streaming pull parser with the following components:
JSONStreamReader provides an implementation of a streaming pull-parser,
similar to JSR 353 for JavaEE, or the Jackson JSON parser. The stream reader
reads strictly conforming JSON data, and has "hooks" to allow reading of
long data, such as base64-encoded data within a JSON string.
This reader should be considered when the source JSON data is from a known safe origin.
JSONObjectBuilder is a builder of JSONObject and JSONArray structures
built on top of the stream reader. The implementation ends up simpler than
JSONTokener, mainly because a lot of the heavy lifting is done in the
stream reader.
JSONLimitStreamReader provides a stream reader that is better at
dealing with JSON data from untrusted origins, such as unknown internet
connections. It is build with deliberate boundaries that avoid memory exhaustion
and other data storage limits, for the purposes of denial-of-service attacks.
JSONLimitBuilder is built on top of the limit stream reader above,
it limits its use of the runtime stack to avoid stack smashing attempts from
untrusted JSON sources.
This parser may be slower than the other object builder above -- <20% in informal testing -- due to its use of trampolining for creating nested structures.
BuilderLimits limits that are applied to a limit stream reader and
limit object builder. These are based on similar limits found in secure
XML processing parsers.
LimitFilter provides an easy interface for accepting or rejecting
particular structures during a JSON parse process.
StructureCollector parameterizes the type of structures to be
created by the object builders. Two provided collectors are:
JSONCollector,
which creates JSONObject and JSONArray objects; andCollectionCollector, which creates HashMap and ArrayList
objects.