Module jakarta.json
Package jakarta.json

Interface JsonPointer


public interface JsonPointer

This interface represents an immutable implementation of a JSON Pointer as defined by RFC 6901.

A JSON Pointer, when applied to a target JsonValue, defines a reference location in the target.

An empty JSON Pointer string defines a reference to the target itself.

If the JSON Pointer string is non-empty, it must be a sequence of '/' prefixed tokens, and the target must either be a JsonArray or JsonObject. If the target is a JsonArray, the pointer defines a reference to an array element, and the last token specifies the index. If the target is a JsonObject, the pointer defines a reference to a name/value pair, and the last token specifies the name.

The method getValue() returns the referenced value. Methods add(), replace(), and remove() execute operations specified in RFC 6902.

Since:
1.1
See Also: