Package burp.api.montoya.utilities.json
Interface JsonObjectNode
-
Method Summary
Modifier and TypeMethodDescriptionasMap()
Retrieves the value for thisJsonNode
.Attempts to return the JsonNode for the given key.getBoolean
(String key) Attempts to return the boolean for the given key.Attempts to return the number for the given key as a double.Attempts to return the number for the given key as a long.Attempts to return the number for the given key.Attempts to return the string for the given key.getValue()
Retrieves the value for thisJsonNode
.boolean
Determines if the object contains the given key.boolean
Determines if the object contains the given key, and if the corresponding value is an array.boolean
hasBoolean
(String key) Determines if the object contains the given key, and if the corresponding value is a boolean.boolean
Determines if the object contains the given key, and if the corresponding value is a number.boolean
Determines if the object contains the given key, and if the corresponding value is an object.boolean
Determines if the object contains the given key, and if the corresponding value is a string.static JsonObjectNode
Creates a new empty instance ofJsonObjectNode
.static JsonObjectNode
jsonObjectNode
(Map<String, ? extends JsonNode> value) Creates a new instance ofJsonObjectNode
from the supplied map of String toJsonNode
.void
Puts aJsonNode
into thisJsonObjectNode
.void
putBoolean
(String key, boolean value) Puts a double into thisJsonObjectNode
.void
Puts a double into thisJsonObjectNode
.void
Puts a long into thisJsonObjectNode
.void
Puts a number into thisJsonObjectNode
.void
Puts a string into thisJsonObjectNode
.void
Removes the given key and corresponding JsonNode from the object.
-
Method Details
-
getValue
-
asMap
-
put
Puts aJsonNode
into thisJsonObjectNode
.- Parameters:
key
- The key to use.value
- The JsonNode that the key should point to.
-
putString
Puts a string into thisJsonObjectNode
.- Parameters:
key
- The key to use.value
- The string value that the key should point to.- Throws:
NullPointerException
- if the value is null.
-
putBoolean
Puts a double into thisJsonObjectNode
.- Parameters:
key
- The key to use.value
- The boolean value that the key should point to.
-
putNumber
Puts a long into thisJsonObjectNode
.- Parameters:
key
- The key to use.value
- The long value that the key should point to.
-
putNumber
Puts a double into thisJsonObjectNode
.- Parameters:
key
- The key to use.value
- The double value that the key should point to.
-
putNumber
Puts a number into thisJsonObjectNode
.- Parameters:
key
- The key to use.value
- The number value that the key should point to.
-
get
-
getString
-
getBoolean
-
getLong
-
getDouble
-
getNumber
-
remove
Removes the given key and corresponding JsonNode from the object.- Parameters:
key
- The key to remove.
-
has
Determines if the object contains the given key.- Parameters:
key
- The key to check for.- Returns:
- True if the object contains the given key.
-
hasString
Determines if the object contains the given key, and if the corresponding value is a string.- Parameters:
key
- The key to check for.- Returns:
- True if the object contains the given key, and the corresponding value is a string.
-
hasBoolean
Determines if the object contains the given key, and if the corresponding value is a boolean.- Parameters:
key
- The key to check for.- Returns:
- True if the object contains the given key, and the corresponding value is a boolean.
-
hasNumber
Determines if the object contains the given key, and if the corresponding value is a number.- Parameters:
key
- The key to check for.- Returns:
- True if the object contains the given key, and the corresponding value is a number.
-
hasArray
Determines if the object contains the given key, and if the corresponding value is an array.- Parameters:
key
- The key to check for.- Returns:
- True if the object contains the given key, and the corresponding value is an array.
-
hasObject
Determines if the object contains the given key, and if the corresponding value is an object.- Parameters:
key
- The key to check for.- Returns:
- True if the object contains the given key, and the corresponding value is an object.
-
jsonObjectNode
Creates a new empty instance ofJsonObjectNode
.- Returns:
- A new
JsonObjectNode
instance.
-
jsonObjectNode
Creates a new instance ofJsonObjectNode
from the supplied map of String toJsonNode
.
-