public static class JsonBuilder.ArrayBuilder extends Object
Modifier and Type | Method and Description |
---|---|
JsonBuilder.ArrayBuilder |
addArray(JsonBuilder.ArrayBuilder builder)
Adds a nested JSON array to the array.
|
JsonBuilder.ArrayBuilder |
addBoolean(boolean value)
Adds a boolean value to the array.
|
JsonBuilder.ArrayBuilder |
addBoolean(Optional<Boolean> maybeValue)
Adds a boolean value to the array, or 'null' if not present.
|
JsonBuilder.ArrayBuilder |
addNull()
Adds a 'null' value to the array.
|
JsonBuilder.ArrayBuilder |
addNumber(double value)
Adds a numeric value to the array.
|
JsonBuilder.ArrayBuilder |
addNumber(Optional<Double> maybeValue)
Adds a numeric value to the array, or 'null' if not present.
|
JsonBuilder.ArrayBuilder |
addObject(JsonBuilder.ObjectBuilder builder)
Adds a nested JSON object to the array.
|
JsonBuilder.ArrayBuilder |
addRaw(Optional<String> maybeRawValue)
Adds a raw JSON value to the array, or 'null' if not present.
|
JsonBuilder.ArrayBuilder |
addRaw(String rawValue)
Adds a raw JSON value to the array.
|
JsonBuilder.ArrayBuilder |
addString(Optional<String> maybeValue)
Adds a string to the array, or 'null' if not present.
|
JsonBuilder.ArrayBuilder |
addString(String value)
Adds a string to the array.
|
JsonBuilder.ArrayBuilder |
merge(JsonBuilder.ArrayBuilder other)
Merges two ArrayBuilders.
|
public JsonBuilder.ArrayBuilder addNull()
public JsonBuilder.ArrayBuilder addBoolean(boolean value)
public JsonBuilder.ArrayBuilder addBoolean(Optional<Boolean> maybeValue)
public JsonBuilder.ArrayBuilder addNumber(double value)
public JsonBuilder.ArrayBuilder addNumber(Optional<Double> maybeValue)
public JsonBuilder.ArrayBuilder addString(String value)
public JsonBuilder.ArrayBuilder addString(Optional<String> maybeValue)
public JsonBuilder.ArrayBuilder addObject(JsonBuilder.ObjectBuilder builder)
public JsonBuilder.ArrayBuilder addArray(JsonBuilder.ArrayBuilder builder)
public JsonBuilder.ArrayBuilder addRaw(String rawValue)
public JsonBuilder.ArrayBuilder addRaw(Optional<String> maybeRawValue)
public JsonBuilder.ArrayBuilder merge(JsonBuilder.ArrayBuilder other)
Collector
instances are not concurrent.