Uses of Interface
jakarta.json.JsonArrayBuilder
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 JsonArrayBuilder in jakarta.json
Modifier and TypeMethodDescriptionJsonArrayBuilder.add
(boolean value) Adds aJsonValue.TRUE
orJsonValue.FALSE
value to the array.JsonArrayBuilder.add
(double value) Adds a value to the array as aJsonNumber
.JsonArrayBuilder.add
(int value) Adds a value to the array as aJsonNumber
.default JsonArrayBuilder
JsonArrayBuilder.add
(int index, boolean value) Adds aJsonValue.TRUE
orJsonValue.FALSE
value to the array at the specified position.default JsonArrayBuilder
JsonArrayBuilder.add
(int index, double value) Adds a value to the array as aJsonNumber
at the specified position.default JsonArrayBuilder
JsonArrayBuilder.add
(int index, int value) Adds a value to the array as aJsonNumber
at the specified position.default JsonArrayBuilder
JsonArrayBuilder.add
(int index, long value) Adds a value to the array as aJsonNumber
at the specified position.default JsonArrayBuilder
JsonArrayBuilder.add
(int index, JsonArrayBuilder builder) Adds aJsonArray
from an array builder to the array at the specified position.default JsonArrayBuilder
JsonArrayBuilder.add
(int index, JsonObjectBuilder builder) Adds aJsonObject
from an object builder to the array at the specified position.default JsonArrayBuilder
Inserts a value to the array at the specified position.default JsonArrayBuilder
Adds a value to the array as aJsonString
at the specified position.default JsonArrayBuilder
JsonArrayBuilder.add
(int index, BigDecimal value) Adds a value to the array as aJsonNumber
at the specified position.default JsonArrayBuilder
JsonArrayBuilder.add
(int index, BigInteger value) Adds a value to the array as aJsonNumber
at the specified position.JsonArrayBuilder.add
(long value) Adds a value to the array as aJsonNumber
.JsonArrayBuilder.add
(JsonArrayBuilder builder) Adds aJsonArray
from an array builder to the array.JsonArrayBuilder.add
(JsonObjectBuilder builder) Adds aJsonObject
from an object builder to the array.Adds a value to the array.Adds a value to the array as aJsonString
.JsonArrayBuilder.add
(BigDecimal value) Adds a value to the array as aJsonNumber
.JsonArrayBuilder.add
(BigInteger value) Adds a value to the array as aJsonNumber
.default JsonArrayBuilder
JsonArrayBuilder.addAll
(JsonArrayBuilder builder) Adds all elements of the array in the specified array builder to the array.JsonArrayBuilder.addNull()
Adds aJsonValue.NULL
value to the array.default JsonArrayBuilder
JsonArrayBuilder.addNull
(int index) Adds aJsonValue.NULL
value to the array at the specified position.static JsonArrayBuilder
Json.createArrayBuilder()
Creates a JSON array builderstatic JsonArrayBuilder
Json.createArrayBuilder
(JsonArray array) Creates a JSON array builder, initialized with the specified arraystatic JsonArrayBuilder
Json.createArrayBuilder
(Collection<?> collection) Creates a JSON array builder, initialized with the content of specifiedcollection
.JsonBuilderFactory.createArrayBuilder()
Creates aJsonArrayBuilder
instance that is used to buildJsonArray
default JsonArrayBuilder
JsonBuilderFactory.createArrayBuilder
(JsonArray array) Creates aJsonArrayBuilder
instance, initialized with an array.default JsonArrayBuilder
JsonBuilderFactory.createArrayBuilder
(Collection<?> collection) Creates aJsonArrayBuilder
instance, initialized with the content of specified collection.default JsonArrayBuilder
JsonArrayBuilder.remove
(int index) Remove the value in the array at the specified position.default JsonArrayBuilder
JsonArrayBuilder.set
(int index, boolean value) Replaces a value in the array with aJsonValue.TRUE
orJsonValue.FALSE
value at the specified position.default JsonArrayBuilder
JsonArrayBuilder.set
(int index, double value) Replaces a value in the array with the specified value as aJsonNumber
at the specified position.default JsonArrayBuilder
JsonArrayBuilder.set
(int index, int value) Replaces a value in the array with the specified value as aJsonNumber
at the specified position.default JsonArrayBuilder
JsonArrayBuilder.set
(int index, long value) Replaces a value in the array with the specified value as aJsonNumber
at the specified position.default JsonArrayBuilder
JsonArrayBuilder.set
(int index, JsonArrayBuilder builder) Replaces a value in the array with the specified value as aJsonArray
from an array builder at the specified position.default JsonArrayBuilder
JsonArrayBuilder.set
(int index, JsonObjectBuilder builder) Replaces a value in the array with the specified value as aJsonObject
from an object builder at the specified position.default JsonArrayBuilder
Replaces a value in the array with the specified value at the specified position.default JsonArrayBuilder
Replaces a value in the array with the specified value as aJsonString
at the specified position.default JsonArrayBuilder
JsonArrayBuilder.set
(int index, BigDecimal value) Replaces a value in the array with the specified value as aJsonNumber
at the specified position.default JsonArrayBuilder
JsonArrayBuilder.set
(int index, BigInteger value) Replaces a value in the array with the specified value as aJsonNumber
at the specified position.default JsonArrayBuilder
JsonArrayBuilder.setNull
(int index) Replaces a value in the array with aJsonValue.NULL
value at the specified position.Modifier and TypeMethodDescriptiondefault JsonArrayBuilder
JsonArrayBuilder.add
(int index, JsonArrayBuilder builder) Adds aJsonArray
from an array builder to the array at the specified position.JsonArrayBuilder.add
(JsonArrayBuilder builder) Adds aJsonArray
from an array builder to the array.JsonObjectBuilder.add
(String name, JsonArrayBuilder builder) Adds a name/JsonArray
pair to the JSON object associated with this object builder.default JsonArrayBuilder
JsonArrayBuilder.addAll
(JsonArrayBuilder builder) Adds all elements of the array in the specified array builder to the array.default JsonArrayBuilder
JsonArrayBuilder.set
(int index, JsonArrayBuilder builder) Replaces a value in the array with the specified value as aJsonArray
from an array builder at the specified position. -
Uses of JsonArrayBuilder in jakarta.json.spi
Modifier and TypeMethodDescriptionabstract JsonArrayBuilder
JsonProvider.createArrayBuilder()
Creates a JSON array builder.JsonProvider.createArrayBuilder
(JsonArray array) Creates a JSON array builder, initialized with the specified array.JsonProvider.createArrayBuilder
(Collection<?> collection) Creates a JSON array builder, initialized with the content of specifiedcollection
. -
Uses of JsonArrayBuilder in jakarta.json.stream
Modifier and TypeMethodDescriptionstatic <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.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 Collector
<JsonValue, JsonArrayBuilder, JsonArray> JsonCollectors.toJsonArray()
Constructs ajava.util.stream.Collector
that accumulates the inputJsonValue
elements into aJsonArray
.