JsonObject Interface
Implements
public interface JsonObject
extends JsonNode
Interface that represents a JSON object.
Method Summary
Modifier and Type | Method and Description |
---|---|
abstract Stream<String> |
fieldNames()
A Stream iterating over all field names in the object. |
abstract
Stream<java.util.Map.Entry<String,Json |
fields()
A Stream iterating over all fields in the object. |
abstract
Json |
get(String name)
Gets the JsonNode field with the specified name in the object. |
abstract boolean |
has(String name)
Returns whether the object has a value for the specified field. |
default boolean |
isObject()
Indicates whether this JsonNode is an instance of JsonObject ( |
abstract
Json |
put(String name, JsonNode jsonNode)
Puts a JsonNode field with the specified name into the object. |
abstract
Json |
remove(String name)
Removes the JsonNode with the specified name from the object. |
abstract
Json |
set(String name, JsonNode jsonNode)
Sets the JsonNode field with the specified name with a new node value. |
Method Details
fieldNames
public abstract Stream
A Stream iterating over all field names in the object.
Returns:
fields
public abstract Stream<>
A Stream iterating over all fields in the object.
Returns:
get
has
public abstract boolean has(String name)
Returns whether the object has a value for the specified field.
Parameters:
Returns:
isObject
public default boolean isObject()
Indicates whether this JsonNode is an instance of JsonObject ({}
).
put
public abstract JsonObject put(String name, JsonNode jsonNode)
Puts a JsonNode field with the specified name into the object.
Parameters:
Returns:
remove
set
Applies to
Azure SDK for Java
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for