@AllParametersAndReturnValuesAreNonnullByDefault
Package org.eclipse.ditto.json
Ditto JSON is a general purpose JSON library. This package provides the corresponding interfaces as well as
implementations. There is one central place for obtaining instances of the various interfaces:
JsonFactory
. JsonFactory provides only static
methods which means that they
can be imported statically and by thus make calls concise to assist the readability of your code.
Please note that Ditto JSON is designed for immutability. Therefore each object returned by JsonFactory - apart from builders - is immutable and thus thread safe. If interfaces provide methods for altering an object then invoking this method does not change the state of that object but a new object with the altered state is returned instead. This is the same behavior like it is shown by java.lang.String for example.
-
Interface Summary Interface Description CborFactory This interface abstracts serialization/deserialization via CBOR.JsonArray Represents a JSON array.JsonArrayBuilder A mutable builder with a fluent API for aJsonArray
.JsonException The methods of this interface are common for all JSON related exceptions.JsonExceptionBuilder<T extends JsonException> A mutable builder for aJsonException
.JsonField Represents a single JSON field.JsonFieldDefinition<T> AJsonFieldDefinition
is a formal description of a singleJsonField
.JsonFieldMarker Marker interface to provide a common type for markers of JSON fields.JsonFieldSelector AJsonFieldSelector
is basically a set ofJsonPointer
s.JsonFieldSelectorBuilder A mutable builder with a fluent API for aJsonFieldSelector
.JsonKey Represents a JSON key.JsonNumber This interface represents a JSON number.JsonObject Represents a JSON object.JsonObjectBuilder A mutable builder for aJsonObject
.JsonParseOptions Holding options about how to parse a Json type (JsonObject, JsonPointer, ...) from a String.JsonParseOptionsBuilder A mutable builder for aJsonParseOptions
.JsonPatch Defines a JSON Patch which can be used to specify modifications on JSON Objects.JsonPointer A JSON pointer defines a path within a JSON object.JsonValue Represents a JSON value.JsonValueContainer<T> Abstract representation of a data structure which somehow holds JSON values.SerializationContext Bundles state and configuration for serialization. -
Class Summary Class Description AbstractJsonExceptionBuilder<T extends JsonException> Abstract base implementation for builders which create objects of subtypes ofJsonRuntimeException
.JsonCollectors This class provides implementations ofCollector
that implement various useful reduction operations, such as accumulating JSON fields into JSON objects etc.JsonFactory The main entry point for the Eclipse Ditto JSON API.JsonFieldSelectorInvalidException.Builder A mutable builder for aJsonPointerInvalidException
.JsonKeyInvalidException.Builder A mutable builder for aJsonKeyInvalidException
.JsonMissingFieldException.Builder A mutable builder for aJsonMissingFieldException
.JsonParseException.Builder A mutable builder for aJsonParseException
.JsonPatch.JsonFields An enumeration of the knownJsonField
s of a Thing.JsonPointerInvalidException.Builder A mutable builder for aJsonPointerInvalidException
.JsonRuntimeException.Builder A mutable builder for aJsonRuntimeException
. -
Enum Summary Enum Description JsonPatch.Operation Enumeration defining the supported JSON Patch operation types. -
Exception Summary Exception Description JsonFieldSelectorInvalidException Thrown if a field selector at was in a invalid format.JsonKeyInvalidException Thrown if aJsonKey
was in an invalid format.JsonMissingFieldException Thrown if an expected JSON field is not in the JSON.JsonParseException Thrown if JSON could not be parsed because it was in an invalid format.JsonPointerInvalidException Thrown if aJsonPointer
was in an invalid format.JsonRuntimeException Common base type of all unchecked JSON exceptions.