| Constructor and Description |
|---|
BooleanJsonNode(boolean value) |
| Modifier and Type | Method and Description |
|---|---|
List<JsonNode> |
asArray()
When
JsonNode.isArray() is true, this returns the array associated with this node. |
boolean |
asBoolean()
When
JsonNode.isBoolean() is true, this returns the boolean associated with this node. |
Object |
asEmbeddedObject()
When
JsonNode.isEmbeddedObject() is true, this returns the embedded object associated with this node. |
String |
asNumber()
When
JsonNode.isNumber() is true, this returns the number associated with this node. |
Map<String,JsonNode> |
asObject()
When
JsonNode.isObject() is true, this returns the object associated with this node. |
String |
asString()
When
JsonNode.isString(), is true, this returns the string associated with this node. |
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
isBoolean()
Returns true if this node represents a JSON boolean: https://datatracker.ietf.org/doc/html/rfc8259#section-3
|
String |
text()
When
JsonNode.isString(), JsonNode.isBoolean(), or JsonNode.isNumber() is true, this will return the value of this node
as a textual string. |
String |
toString() |
<T> T |
visit(JsonNodeVisitor<T> visitor)
Visit this node using the provided visitor.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitemptyObjectNode, field, index, isArray, isEmbeddedObject, isNull, isNumber, isObject, isString, parser, parserBuilderpublic boolean isBoolean()
JsonNodeisBoolean in interface JsonNodeJsonNode.asBoolean()public String asNumber()
JsonNodeJsonNode.isNumber() is true, this returns the number associated with this node. This will throw an exception if
JsonNode.isNumber() is false.asNumber in interface JsonNodeJsonNode.text()public String asString()
JsonNodeJsonNode.isString(), is true, this returns the string associated with this node. This will throw an exception if
JsonNode.isString() ()} is false.public boolean asBoolean()
JsonNodeJsonNode.isBoolean() is true, this returns the boolean associated with this node. This will throw an exception if
JsonNode.isBoolean() is false.public List<JsonNode> asArray()
JsonNodeJsonNode.isArray() is true, this returns the array associated with this node. This will throw an exception if
JsonNode.isArray() is false.public Map<String,JsonNode> asObject()
JsonNodeJsonNode.isObject() is true, this returns the object associated with this node. This will throw an exception if
JsonNode.isObject() is false.public Object asEmbeddedObject()
JsonNodeJsonNode.isEmbeddedObject() is true, this returns the embedded object associated with this node. This will throw
an exception if JsonNode.isEmbeddedObject() is false.asEmbeddedObject in interface JsonNodeJsonNode.isEmbeddedObject()public <T> T visit(JsonNodeVisitor<T> visitor)
JsonNodepublic String text()
JsonNodeJsonNode.isString(), JsonNode.isBoolean(), or JsonNode.isNumber() is true, this will return the value of this node
as a textual string. If this is any other type, this will return null.Copyright © 2023. All rights reserved.