Uses of Interface
jakarta.json.JsonValue
Package
Description
Provides an object model API to process JSON.
Service Provider Interface (SPI) to plug in implementations for
JSON processing objects.
Provides a streaming API to parse and generate
JSON.
-
Uses of JsonValue in jakarta.json
Modifier and TypeInterfaceDescriptioninterface
JsonArray
represents an immutable JSON array (an ordered sequence of zero or more values).interface
An immutable JSON number value.interface
JsonObject
class represents an immutable JSON object value (an unordered collection of zero or more name/value pairs).interface
An immutable JSON string value.interface
Modifier and TypeFieldDescriptionstatic final JsonValue
JsonValue.FALSE
JSON false value.static final JsonValue
JsonValue.NULL
JSON null value.static final JsonValue
JsonValue.TRUE
JSON true value.Modifier and TypeMethodDescriptionJsonArray.getValuesAs
(Class<T> clazz) Returns a list view of the specified type for the array.JsonArray.getValuesAs
(Function<K, T> func) Returns a list view for the array.Modifier and TypeMethodDescriptionApplies the JSON Merge Patch to the specifiedtarget
.JsonPointer.getValue
(JsonStructure target) Returns the value at the referenced location in the specifiedtarget
.default JsonValue
Get the value referenced by the provided JSON Pointer in the JsonStructure.default JsonValue
JsonReader.readValue()
Returns a JSON value that is represented in the input source.JsonMergePatch.toJsonValue()
Returns theJsonMergePatch
asJsonValue
.Modifier and TypeMethodDescriptiondefault JsonArrayBuilder
Inserts a value to the array at the specified position.Adds a value to the array.Adds a name/JsonValue
pair to the JSON object associated with this object builder.Adds an "add" JSON Patch operation.<T extends JsonStructure>
TAdds or replaces a value at the referenced location in the specifiedtarget
with the specifiedvalue
.Applies the JSON Merge Patch to the specifiedtarget
.static JsonMergePatch
Json.createMergeDiff
(JsonValue source, JsonValue target) Generates a JSON Merge Patch (RFC 7396) from the source and targetJsonValue
s which when applied to thesource
, yields thetarget
.static JsonMergePatch
Json.createMergePatch
(JsonValue patch) Creates JSON Merge Patch (RFC 7396) from specifiedJsonValue
.Adds a "replace" JSON Patch operation.<T extends JsonStructure>
TReplaces the value at the referenced location in the specifiedtarget
with the specifiedvalue
.default JsonArrayBuilder
Replaces a value in the array with the specified value at the specified position.Adds a "test" JSON Patch operation.default void
Writes the specifiedJsonValue
to the output source. -
Uses of JsonValue in jakarta.json.spi
Modifier and TypeMethodDescriptionJsonProvider.createMergeDiff
(JsonValue source, JsonValue target) Generates a JSON Merge Patch (RFC 7396) from the source and targetJsonValue
s which when applied to thesource
, yields thetarget
.JsonProvider.createMergePatch
(JsonValue patch) Creates JSON Merge Patch (RFC 7396) from specifiedJsonValue
. -
Uses of JsonValue in jakarta.json.stream
Modifier and TypeMethodDescriptiondefault JsonValue
JsonParser.getValue()
Returns aJsonValue
at the current parser position.Modifier and TypeMethodDescriptionJsonParser.getArrayStream()
Returns a stream of theJsonArray
elements.JsonParser.getObjectStream()
Returns a stream of theJsonObject
's name/value pairs.JsonParser.getValueStream()
Returns a stream ofJsonValue
from a sequence of JSON values.static Collector
<JsonValue, Map<String, JsonArrayBuilder>, JsonObject> JsonCollectors.groupingBy
(Function<JsonValue, String> classifier) Constructs ajava.util.stream.Collector
that implements a "group by" operation on the inputJsonValue
elements.static <T extends JsonArrayBuilder>
Collector<JsonValue, Map<String, T>, JsonObject> JsonCollectors.groupingBy
(Function<JsonValue, String> classifier, Collector<JsonValue, T, JsonArray> downstream) Constructs ajava.util.stream.Collector
that implements a "group by" operation on the inputJsonValue
elements.static Collector
<JsonValue, JsonArrayBuilder, JsonArray> JsonCollectors.toJsonArray()
Constructs ajava.util.stream.Collector
that accumulates the inputJsonValue
elements into aJsonArray
.JsonCollectors.toJsonObject()
Constructs ajava.util.stream.Collector
that accumulates the inputMap.Entry<String,JsonValue>
elements into aJsonObject
.JsonCollectors.toJsonObject
(Function<JsonValue, String> keyMapper, Function<JsonValue, JsonValue> valueMapper) Constructs ajava.util.stream.Collector
that accumulates the inputJsonValue
elements into aJsonObject
.Modifier and TypeMethodDescriptionWrites the specified value as a JSON value within the current array, field or root context.Writes a JSON name/value pair in the current object context.Modifier and TypeMethodDescriptionstatic Collector
<JsonValue, Map<String, JsonArrayBuilder>, JsonObject> JsonCollectors.groupingBy
(Function<JsonValue, String> classifier) Constructs ajava.util.stream.Collector
that implements a "group by" operation on the inputJsonValue
elements.static <T extends JsonArrayBuilder>
Collector<JsonValue, Map<String, T>, JsonObject> JsonCollectors.groupingBy
(Function<JsonValue, String> classifier, Collector<JsonValue, T, JsonArray> downstream) Constructs ajava.util.stream.Collector
that implements a "group by" operation on the inputJsonValue
elements.static <T extends JsonArrayBuilder>
Collector<JsonValue, Map<String, T>, JsonObject> JsonCollectors.groupingBy
(Function<JsonValue, String> classifier, Collector<JsonValue, T, JsonArray> downstream) Constructs ajava.util.stream.Collector
that implements a "group by" operation on the inputJsonValue
elements.JsonCollectors.toJsonObject
(Function<JsonValue, String> keyMapper, Function<JsonValue, JsonValue> valueMapper) Constructs ajava.util.stream.Collector
that accumulates the inputJsonValue
elements into aJsonObject
.