plus

operator fun plus(other: JsonPointer): JsonPointer(source)

Concatenates this pointer with another pointer, creating a new pointer with combined segments.

Return

A new JsonPointer containing all segments from both pointers.

Parameters

other

The JsonPointer to append to this one.


operator fun plus(other: String): RelativePointerResult(source)

Applies a Relative JSON Pointer (draft-bhutton-relative-json-pointer-00) to this pointer.

The non-negative integer prefix determines how many levels to ascend. An optional +N or -N suffix adjusts the last segment of the traversed pointer as an array index. The result depends on whether # is present:

Note: Index vs Key is determined without document context, using integer-string detection as a proxy for array vs. object membership — consistent with JSON Pointer addressing conventions.

Return

A RelativePointerResult describing the resolved location or member key/index.

Parameters

other

A valid Relative JSON Pointer string.

Throws

if other is not a valid Relative JSON Pointer string, if the prefix exceeds this pointer's depth, if an index adjustment targets a non-integer segment or would produce a negative index, or if # is used when the traversed pointer is the root.