ObjectNode
Extends JsonNode
The JsonObject class represents a JSON object node and provides methods for manipulating its data.
Methods
get(key: String): JsonNode
Retrieves the value of the specified property from the JSON object.
put(key: String, intValue: Integer): void
Adds or replaces a property with an integer value.
put(key: String, longValue: Long): void
Adds or replaces a property with a long value.
put(key: String, floatValue: Float): void
Adds or replaces a property with a float value.
put(key: String, doubleValue: Float): void
Adds or replaces a property with a double value.
put(key: String, textValue: String): void
Adds or replaces a property with a text value.
put(key: String, value: JsonNode): void
Adds or replaces a property with a JsonNode value.
get(key: String): JsonNode
Retrieves a property value, as JsonNode.
remove(key: String): void
Removes a property.
has(key: String): Boolean
Checks if a property exists.
size(): Integer
Retrieves the number of properties.
clear(): void
Removes all properties.
isEmpty(): Boolean
Checks if the object node is empty.
toString(): String
Returns the JSON node as a JSON string.
Examples
Last updated