Package burp.api.montoya.utilities.json
Interface JsonArrayNode
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds aJsonNode
to thisJsonArrayNode
.void
addBoolean
(boolean value) Adds a boolean to thisJsonArrayNode
.void
addNumber
(double value) Adds a double to thisJsonArrayNode
.void
addNumber
(long value) Adds a long to thisJsonArrayNode
.void
Adds a number to thisJsonArrayNode
.void
Adds a string to thisJsonArrayNode
.asList()
Retrieves the value for thisJsonNode
.get
(int index) Attempts to return the JsonNode at the given index.getBoolean
(int index) Attempts to return the boolean at the given index.getDouble
(int index) Attempts to return the number at the given index as a double.getLong
(int index) Attempts to return the number at the given index as a long.getNumber
(int index) Attempts to return the number at the given index.getString
(int index) Attempts to return the string at the given index.getValue()
Retrieves the value for thisJsonNode
.static JsonArrayNode
Creates a new empty instance ofJsonArrayNode
.static JsonArrayNode
jsonArrayNode
(JsonNode... values) Creates a new instance ofJsonArrayNode
from the suppliedJsonNode
instances.static JsonArrayNode
jsonArrayNode
(List<? extends JsonNode> value) Creates a new instance ofJsonArrayNode
from the supplied list ofJsonNode
.void
remove
(int index) Removes the JsonNode at the given index.
-
Method Details
-
getValue
-
asList
-
add
Adds aJsonNode
to thisJsonArrayNode
.- Parameters:
value
- The node to add.
-
addString
Adds a string to thisJsonArrayNode
.- Parameters:
value
- The string to add.- Throws:
NullPointerException
- if the value is null.
-
addBoolean
void addBoolean(boolean value) Adds a boolean to thisJsonArrayNode
.- Parameters:
value
- The boolean to add.
-
addNumber
-
addNumber
void addNumber(double value) Adds a double to thisJsonArrayNode
.- Parameters:
value
- The double to add.
-
addNumber
Adds a number to thisJsonArrayNode
.- Parameters:
value
- The number to add.
-
get
-
getString
-
getBoolean
-
getLong
-
getDouble
-
getNumber
-
remove
void remove(int index) Removes the JsonNode at the given index.- Parameters:
index
- The index for the JsonNode to remove.
-
jsonArrayNode
Creates a new empty instance ofJsonArrayNode
.- Returns:
- A new
JsonArrayNode
instance.
-
jsonArrayNode
Creates a new instance ofJsonArrayNode
from the supplied list ofJsonNode
. -
jsonArrayNode
Creates a new instance ofJsonArrayNode
from the suppliedJsonNode
instances.
-