Uses of Interface
org.eclipse.ditto.json.JsonObject
-
Uses of JsonObject in org.eclipse.ditto.json
Methods in org.eclipse.ditto.json that return JsonObjectModifier and TypeMethodDescriptionJsonValue.asObject()
Returns this JSON value asJsonObject
, assuming that this value represents a JSON object.JsonObjectBuilder.build()
Creates a newJsonObject
containing all values which were added beforehand.static JsonObject
JsonFactory.createJsonObject
(Map<String, JsonField> jsonFieldMap, byte[] cborObjectRepresentation) Creates aJsonObject
backed with an already serialized CBOR representation as the passed bytes.static JsonObject
JsonObject.empty()
Returns an empty instance ofJsonObject
.default JsonObject
Filters thejson fields
of this object and all nested objects based on the given predicate.JsonObject.get
(JsonFieldDefinition<?> fieldDefinition) This is a convenience method which does the same asget(JsonPointer)
.JsonObject.get
(JsonFieldSelector fieldSelector) Returns a new JSON object which is composed from parts of this object.JsonObject.get
(JsonPointer pointer) Returns a new JSON object containing the whole object hierarchy of the value which is defined by the given pointer.static JsonObject
JsonFactory.newObject()
Returns an empty JSON object.static JsonObject
JsonFactory.newObject
(byte[] jsonData) Creates a JSON object from the given byte array.static JsonObject
static JsonObject
Creates a JSON object from the given string.static JsonObject
Creates a JSON object from the given key-value pairs aka fields.static JsonObject
JsonFactory.newObject
(JsonObject jsonObject1, JsonObject jsonObject2) Merge two JSON objects into one JSON object.static JsonObject
JsonFactory.newObject
(JsonPointer path, JsonValue value) Creates a JSON object from the givenpath
andvalue
.static JsonObject
static JsonObject
JsonFactory.nullObject()
Returns a JSON NULL literal which is typed as JSON object.static JsonObject
JsonObject.of
(byte[] jsonData) Creates aJsonObject
from the given byte array.static JsonObject
Creates aJsonObject
from the given string.JsonObject.remove
(CharSequence key) Removes the JSON field to which the given pointer points to.Sets the specified field to a copy of this object.<T> JsonObject
JsonObject.set
(JsonFieldDefinition<T> fieldDefinition, T value) Sets the specified value to a field which is defined by the pointer of the given field definition on a copy of this object.Creates a new JSON object by setting the given JSON fields to this object.JsonObject.setValue
(CharSequence key, boolean value) Creates a new JSON object by setting a new JSON field with the specified key and the JSON representation of the specifiedboolean
value to the new object.JsonObject.setValue
(CharSequence key, double value) Creates a new JSON object by setting a new JSON field with the specified key and the JSON representation of the specifieddouble
value to the new object.JsonObject.setValue
(CharSequence key, int value) Creates a new JSON object by setting a new JSON field with the specified key and the JSON representation of the specifiedint
value to the new object.JsonObject.setValue
(CharSequence key, long value) Creates a new JSON object by setting a new JSON field with the specified key and the JSON representation of the specifiedlong
value to the new object.JsonObject.setValue
(CharSequence key, String value) Creates a new JSON object by setting a new JSON field with the specified key and the JSON representation of the specifiedString
value to the new object.JsonObject.setValue
(CharSequence key, JsonValue value) Creates a new JSON object by setting a new JSON field with the specified key and the specified JSON value to the new object.JsonPatch.toJson()
Returns the JSON object representation of this JSON Patch.Methods in org.eclipse.ditto.json that return types with arguments of type JsonObjectModifier and TypeMethodDescriptionJsonCollectors.fieldsToObject()
Returns aCollector
that accumulates the input JSON fields into a newJsonObject
.static JsonFieldDefinition<JsonObject>
JsonFactory.newJsonObjectFieldDefinition
(CharSequence pointer, JsonFieldMarker... markers) Returns a new definition of a JSON field which contains anJsonObject
value.JsonCollectors.objectsToObject()
Returns aCollector
that accumulates the input JSON objects into a newJsonObject
.JsonCollectors.objectsToObject()
Returns aCollector
that accumulates the input JSON objects into a newJsonObject
.static JsonFieldDefinition<JsonObject>
JsonFieldDefinition.ofJsonObject
(CharSequence pointer, JsonFieldMarker... markers) Returns a new JSON field definition for aJsonObject
value.Methods in org.eclipse.ditto.json with parameters of type JsonObjectModifier and TypeMethodDescriptionstatic JsonObject
JsonFactory.newObject
(JsonObject jsonObject1, JsonObject jsonObject2) Merge two JSON objects into one JSON object.