JsonPointer

A JSON Pointer (RFC 6901) into a surface's data model.

A2UI uses pointers for two things that RFC 6901 does not distinguish, so this type carries the distinction as isAbsolute:

  • An absolute pointer (/user/name, or the empty string) resolves from the root of the data model no matter where the component using it sits in the UI tree.

  • A relative pointer (name) resolves from the item currently being iterated by the enclosing list template — see EvaluationScope. RFC 6901 has no such form: every pointer it defines either is empty or begins with /.

Deviation from RFC 6901, required by the specification. Under the RFC, / is a pointer to the member whose name is the empty string, and only "" addresses the whole document. A2UI instead says of updateDataModel.path: "If omitted, or set to /, refers to the entire data model." This type follows A2UI, so "" and / both parse to ROOT and there is no way to write a pointer to a top-level "" key. The alternative — following the RFC and reading / as a key — would silently write agent payloads into the wrong place.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

True when this addresses the whole data model rather than a member of it.

Link copied to clipboard

Functions

Link copied to clipboard
fun child(token: String): JsonPointer

This pointer extended by one more unescaped token.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

other resolved against this pointer as its base.

Link copied to clipboard
open override fun toString(): String