JsonPrimitiveAdapter

class JsonPrimitiveAdapter(val backing: JsonPrimitive) : JsonElementAdapter, KpaPrimitive(source)

Adapter exposing a JsonPrimitive (including JsonNull) as a KpaPrimitive.

Parameters

backing

The underlying JsonPrimitive.

Constructors

Link copied to clipboard
constructor(backing: JsonPrimitive)

Properties

Link copied to clipboard
open override val backing: JsonPrimitive

Functions

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

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