Package-level declarations

Types

Link copied to clipboard
sealed interface KpaElement

Common parent of every value type the JSON-Pointer abstraction can address.

Link copied to clipboard

Factory of KpaElement values for a particular backing representation.

Link copied to clipboard
interface KpaList : KpaElement

Read-only view of a list-shaped structure addressable by integer indices.

Link copied to clipboard

DSL scope for applying pointer-based mutations to a KpaList.

Link copied to clipboard
Link copied to clipboard

Marker interface representing a leaf value (string, number, boolean, null, etc.).

Link copied to clipboard
interface KpaStruct : KpaElement

Read-only view of an object-shaped structure addressable by string keys.

Link copied to clipboard

DSL scope for applying pointer-based mutations to a KpaStruct.

Link copied to clipboard

Trivial implementation of KpaElementFactory creating SimplePrimitive, SimpleStruct, and SimpleList instances.

Link copied to clipboard
class SimpleList(list: ImmutableList<KpaElement>) : KpaList

Trivial implementation of KpaList backed by an ImmutableList.

Link copied to clipboard
class SimplePrimitive(val value: Any?) : KpaPrimitive

Trivial implementation of KpaPrimitive wrapping a plain value.

Link copied to clipboard
class SimpleStruct(map: ImmutableMap<String, KpaElement>) : KpaStruct

Trivial implementation of KpaStruct backed by an ImmutableMap.

Functions

Link copied to clipboard
operator fun KpaList.get(pointer: KPointer): KpaElement?

Returns the KpaElement at the path identified by pointer, or null if a segment is not a valid index.

operator fun KpaStruct.get(pointer: KPointer): KpaElement?

Returns the KpaElement at the path identified by pointer, or null if a key along the path is absent. Returns the receiver if pointer is the root pointer.

Link copied to clipboard

Creates a new KpaList by applying pointer-based mutations within block.

Creates a new KpaStruct by applying pointer-based mutations within block.