Package | Description |
---|---|
javax.json |
Provides an object model API to process JSON.
|
javax.json.stream |
Provides a streaming API to parse and generate
JSON.
|
Modifier and Type | Interface and Description |
---|---|
interface |
JsonArray
JsonArray represents an immutable JSON array
(an ordered sequence of zero or more values). |
interface |
JsonNumber
An immutable JSON number value.
|
interface |
JsonObject
JsonObject class represents an immutable JSON object value
(an unordered collection of zero or more name/value pairs). |
interface |
JsonString
An immutable JSON string value.
|
interface |
JsonStructure
|
Modifier and Type | Field and Description |
---|---|
static JsonValue |
JsonValue.FALSE
JSON false value
|
static JsonValue |
JsonValue.NULL
JSON null value.
|
static JsonValue |
JsonValue.TRUE
JSON true value.
|
Modifier and Type | Method and Description |
---|---|
<T extends JsonValue> |
JsonArray.getValuesAs(Class<T> clazz)
Returns a list a view of the specified type for the array.
|
Modifier and Type | Method and Description |
---|---|
static JsonValue |
JsonMergePatch.diff(JsonValue source,
JsonValue target)
Generate a JSON Merge Patch from the source and target
JsonValue . |
JsonValue |
JsonPointer.getValue(JsonStructure target)
Returns the value at the referenced location in the specified
target |
default JsonValue |
JsonStructure.getValue(String jsonPointer)
Get the value referenced by the provided JSON Pointer in the JsonStructure
|
static JsonValue |
JsonMergePatch.mergePatch(JsonValue target,
JsonValue patch)
Applies the specified patch to the specified target.
|
default JsonValue |
JsonReader.readValue()
Returns a JSON value that is represented in
the input source.
|
static JsonValue |
JsonUtil.toJson(String jsonString)
Reads the input JSON text and returns a JsonValue.
|
Modifier and Type | Method and Description |
---|---|
default JsonArrayBuilder |
JsonArrayBuilder.add(int index,
JsonValue value)
Inserts a value to the array at the specified position.
|
JsonArray |
JsonPointer.add(JsonArray target,
JsonValue value)
Adds or replaces a value at the referenced location in the specified
target with the specified value . |
JsonObject |
JsonPointer.add(JsonObject target,
JsonValue value)
Adds or replaces a value at the referenced location in the specified
target with the specified value . |
JsonStructure |
JsonPointer.add(JsonStructure target,
JsonValue value)
Adds or replaces a value at the referenced location in the specified
target with the specified value . |
JsonArrayBuilder |
JsonArrayBuilder.add(JsonValue value)
Adds a value to the array.
|
JsonPatchBuilder |
JsonPatchBuilder.add(String path,
JsonValue value)
Adds an "add" JSON Patch operation.
|
JsonObjectBuilder |
JsonObjectBuilder.add(String name,
JsonValue value)
Adds a name/
JsonValue pair to the JSON object associated with
this object builder. |
static JsonValue |
JsonMergePatch.diff(JsonValue source,
JsonValue target)
Generate a JSON Merge Patch from the source and target
JsonValue . |
static JsonValue |
JsonMergePatch.mergePatch(JsonValue target,
JsonValue patch)
Applies the specified patch to the specified target.
|
JsonArray |
JsonPointer.replace(JsonArray target,
JsonValue value)
Replaces the value at the referenced location in the specified
|
JsonObject |
JsonPointer.replace(JsonObject target,
JsonValue value)
Replaces the value at the referenced location in the specified
|
JsonStructure |
JsonPointer.replace(JsonStructure target,
JsonValue value)
Replaces the value at the referenced location in the specified
target with the specified value . |
JsonPatchBuilder |
JsonPatchBuilder.replace(String path,
JsonValue value)
Adds a "replace" JSON Patch operation.
|
default JsonArrayBuilder |
JsonArrayBuilder.set(int index,
JsonValue value)
Replaces a value in the array with the specified value at the
specified position.
|
JsonPatchBuilder |
JsonPatchBuilder.test(String path,
JsonValue value)
Adds a "test" JSON Patch operation.
|
default void |
JsonWriter.write(JsonValue value)
Writes the specified
JsonValue to the output source. |
Modifier and Type | Method and Description |
---|---|
default JsonValue |
JsonParser.getValue()
Returns a
JsonValue at the current parser position. |
Modifier and Type | Method and Description |
---|---|
default java.util.stream.Stream<JsonValue> |
JsonParser.getArrayStream()
Returns a stream of the
JsonArray elements. |
default java.util.stream.Stream<Map.Entry<String,JsonValue>> |
JsonParser.getObjectStream()
Returns a stream of the
JsonObject 's
name/value pairs. |
default java.util.stream.Stream<JsonValue> |
JsonParser.getValueStream()
Returns a stream of
JsonValue from a sequence of
JSON values. |
static java.util.stream.Collector<JsonValue,Map<String,JsonArrayBuilder>,JsonObject> |
JsonCollectors.groupingBy(java.util.function.Function<JsonValue,String> classifier)
Constructs a
java.util.stream.Collector that implements a "group by" operation on the
input JsonValue elements. |
static java.util.stream.Collector<JsonValue,Map<String,JsonArrayBuilder>,JsonObject> |
JsonCollectors.groupingBy(java.util.function.Function<JsonValue,String> classifier,
java.util.stream.Collector<JsonValue,JsonArrayBuilder,JsonArray> downstream)
Constructs a
java.util.stream.Collector that implements a "group by" operation on the
input JsonValue elements. |
static java.util.stream.Collector<JsonValue,JsonArrayBuilder,JsonArray> |
JsonCollectors.toJsonArray()
Constructs a
java.util.stream.Collector that accumulates the input JsonValue
elements into a JsonArray . |
static java.util.stream.Collector<JsonValue,JsonObjectBuilder,JsonObject> |
JsonCollectors.toJsonObject(java.util.function.Function<JsonValue,String> keyMapper,
java.util.function.Function<JsonValue,JsonValue> valueMapper)
Constructs a
java.util.stream.Collector that accumulates the input JsonValue
elements into a JsonObject . |
Modifier and Type | Method and Description |
---|---|
JsonGenerator |
JsonGenerator.write(JsonValue value)
Writes the specified value as a JSON value within
the current array or root context.
|
JsonGenerator |
JsonGenerator.write(String name,
JsonValue value)
Writes a JSON name/value pair in the current object context.
|
Modifier and Type | Method and Description |
---|---|
static java.util.stream.Collector<JsonValue,Map<String,JsonArrayBuilder>,JsonObject> |
JsonCollectors.groupingBy(java.util.function.Function<JsonValue,String> classifier)
Constructs a
java.util.stream.Collector that implements a "group by" operation on the
input JsonValue elements. |
static java.util.stream.Collector<JsonValue,Map<String,JsonArrayBuilder>,JsonObject> |
JsonCollectors.groupingBy(java.util.function.Function<JsonValue,String> classifier,
java.util.stream.Collector<JsonValue,JsonArrayBuilder,JsonArray> downstream)
Constructs a
java.util.stream.Collector that implements a "group by" operation on the
input JsonValue elements. |
static java.util.stream.Collector<JsonValue,Map<String,JsonArrayBuilder>,JsonObject> |
JsonCollectors.groupingBy(java.util.function.Function<JsonValue,String> classifier,
java.util.stream.Collector<JsonValue,JsonArrayBuilder,JsonArray> downstream)
Constructs a
java.util.stream.Collector that implements a "group by" operation on the
input JsonValue elements. |
static java.util.stream.Collector<JsonValue,JsonObjectBuilder,JsonObject> |
JsonCollectors.toJsonObject(java.util.function.Function<JsonValue,String> keyMapper,
java.util.function.Function<JsonValue,JsonValue> valueMapper)
Constructs a
java.util.stream.Collector that accumulates the input JsonValue
elements into a JsonObject . |
static java.util.stream.Collector<JsonValue,JsonObjectBuilder,JsonObject> |
JsonCollectors.toJsonObject(java.util.function.Function<JsonValue,String> keyMapper,
java.util.function.Function<JsonValue,JsonValue> valueMapper)
Constructs a
java.util.stream.Collector that accumulates the input JsonValue
elements into a JsonObject . |
static java.util.stream.Collector<JsonValue,JsonObjectBuilder,JsonObject> |
JsonCollectors.toJsonObject(java.util.function.Function<JsonValue,String> keyMapper,
java.util.function.Function<JsonValue,JsonValue> valueMapper)
Constructs a
java.util.stream.Collector that accumulates the input JsonValue
elements into a JsonObject . |
Copyright © 2012-2015, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.
Comments to : [email protected]