JsonElementAdapter

interface JsonElementAdapter : BackedKpaElement<JsonElement> (source)

Common interface for all kxs adapters, exposing the underlying JsonElement.

Extends BackedKpaElement so the backing element is accessible through the shared interface and can be unwrapped via com.commonsware.kpointer.adapter.requireBacking. Concrete adapters also implement one of KpaStruct, KpaList, or KpaPrimitive, which makes them subtypes of KpaElement via those interfaces.

Inheritors

Properties

Link copied to clipboard
abstract val backing: JsonElement

Functions

Link copied to clipboard
fun KpaElement.toJsonElement(): JsonElement

Returns the JsonElement backing this adapter, or throws if this is not a JsonElementAdapter.