Class ObjectJsonNode
java.lang.Object
software.amazon.awssdk.protocols.jsoncore.internal.ObjectJsonNode
- All Implemented Interfaces:
JsonNode
An object
JsonNode
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionasArray()
WhenJsonNode.isArray()
is true, this returns the array associated with this node.boolean
WhenJsonNode.isBoolean()
is true, this returns the boolean associated with this node.WhenJsonNode.isEmbeddedObject()
is true, this returns the embedded object associated with this node.asNumber()
WhenJsonNode.isNumber()
is true, this returns the number associated with this node.asObject()
WhenJsonNode.isObject()
is true, this returns the object associated with this node.asString()
WhenJsonNode.isString()
, is true, this returns the string associated with this node.boolean
WhenJsonNode.isObject()
is true, this will return the result ofOptional.ofNullable(asObject().get(child))
.int
hashCode()
boolean
isObject()
Returns true if this node represents a JSON object: https://datatracker.ietf.org/doc/html/rfc8259#section-4text()
WhenJsonNode.isString()
,JsonNode.isBoolean()
, orJsonNode.isNumber()
is true, this will return the value of this node as a textual string.toString()
<T> T
visit
(JsonNodeVisitor<T> visitor) Visit this node using the provided visitor.
-
Constructor Details
-
ObjectJsonNode
-
-
Method Details
-
isObject
public boolean isObject()Description copied from interface:JsonNode
Returns true if this node represents a JSON object: https://datatracker.ietf.org/doc/html/rfc8259#section-4 -
asNumber
Description copied from interface:JsonNode
WhenJsonNode.isNumber()
is true, this returns the number associated with this node. This will throw an exception ifJsonNode.isNumber()
is false. -
asString
Description copied from interface:JsonNode
WhenJsonNode.isString()
, is true, this returns the string associated with this node. This will throw an exception ifJsonNode.isString()
()} is false. -
asBoolean
public boolean asBoolean()Description copied from interface:JsonNode
WhenJsonNode.isBoolean()
is true, this returns the boolean associated with this node. This will throw an exception ifJsonNode.isBoolean()
is false. -
asArray
Description copied from interface:JsonNode
WhenJsonNode.isArray()
is true, this returns the array associated with this node. This will throw an exception ifJsonNode.isArray()
is false. -
asObject
Description copied from interface:JsonNode
WhenJsonNode.isObject()
is true, this returns the object associated with this node. This will throw an exception ifJsonNode.isObject()
is false. -
visit
Description copied from interface:JsonNode
Visit this node using the provided visitor. -
asEmbeddedObject
Description copied from interface:JsonNode
WhenJsonNode.isEmbeddedObject()
is true, this returns the embedded object associated with this node. This will throw an exception ifJsonNode.isEmbeddedObject()
is false.- Specified by:
asEmbeddedObject
in interfaceJsonNode
- See Also:
-
text
Description copied from interface:JsonNode
WhenJsonNode.isString()
,JsonNode.isBoolean()
, orJsonNode.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. -
field
Description copied from interface:JsonNode
WhenJsonNode.isObject()
is true, this will return the result ofOptional.ofNullable(asObject().get(child))
. If this is any other type, this will returnOptional.empty()
. -
toString
-
equals
-
hashCode
public int hashCode()
-