public interface JsonArray extends JsonValue
| Modifier and Type | Method and Description |
|---|---|
JsonArray |
add(JsonValue value)
Adds new element to json array.
|
JsonArray |
add(JsonValue value,
int index)
Adds new element to json array at specified position.
|
void |
clear()
Clears content of json array.
|
JsonValue |
first()
Reads first element of json array.
|
JsonValue |
get(int index)
Reads n'th item from json array.
|
boolean |
isEmpty()
Checks if this json array contains no value.
|
JsonValue |
last()
Reads last element of json array.
|
JsonValue |
remove(int index)
Removes n'th element from json array.
|
int |
size()
Size of json array.
|
List<JsonValue> |
toList()
Converts this instance to regulat list of values.
|
asArray, asBoolLiteral, asExpLiteral, asFracLiteral, asIntLiteral, asLiteral, asNullLiteral, asObject, asStringLiteral, findAll, findAllLiterals, findFirst, findFirstLiteral, isArray, isBoolLiteral, isExpLiteral, isFracLiteral, isIntLiteral, isLiteral, isNullLiteral, isObject, isStringLiteral, parent, parentIndex, path, remove, toCompactString, toPrettyStringboolean isEmpty()
int size()
void clear()
JsonValue get(int index)
index - order if returned item (first element has index=0)JsonValue first()
JsonValue last()
JsonValue remove(int index)
index - position of element in json array which should be removedJsonArray add(JsonValue value)
value - value to be added to the array. Should not be emptyJsonArray add(JsonValue value, int index)
value - value to be added to the array. Should not be emptyindex - position where value should be added;Copyright © 2018. All rights reserved.