Package javax.json
The object model API is a high-level API that provides immutable object
models for JSON object and array structures. These JSON structures are
represented as object models using the Java types JsonObject
and JsonArray
. The interface javax.json.JsonObject
provides
a Map
view to access the unordered collection of zero or
more name/value pairs from the model. Similarly, the interface
JsonArray
provides a List
view to access the
ordered sequence of zero or more values from the model.
The object model API uses builder patterns to create these object models.
The classes JsonObjectBuilder
and
JsonArrayBuilder
provide methods to create models
of type JsonObject
and JsonArray
respectively.
These object models can also be created from an input source using
the class JsonReader
. Similarly, these object models
can be written to an output source using the class JsonWriter
.
- Since:
- JSON Processing 1.0
-
ClassDescriptionFactory class for creating JSON processing objects.
JsonArray
represents an immutable JSON array (an ordered sequence of zero or more values).A builder for creatingJsonArray
models from scratch.Factory to createJsonObjectBuilder
andJsonArrayBuilder
instances.JsonException
indicates that some exception happened during JSON processing.An immutable JSON number value.JsonObject
class represents an immutable JSON object value (an unordered collection of zero or more name/value pairs).A builder for creatingJsonObject
models from scratch.Factory to createJsonReader
instances.An immutable JSON string value.JsonValue
represents an immutable JSON value.Indicates the type of aJsonValue
object.Factory to createJsonWriter
instances.