asString

abstract fun asString(input: KpaElement?): String(source)

Coerces input to its rendered string form using the same rule as {{ identifier }}:

  • null renders as the literal string "null".

  • A string com.commonsware.kpointer.adapter.KpaPrimitive renders as its stringOrNull content (no quotes).

  • A non-string com.commonsware.kpointer.adapter.KpaPrimitive renders via renderedString().

  • A com.commonsware.kpointer.adapter.KpaStruct or com.commonsware.kpointer.adapter.KpaList renders in a compact JSON-ish structural form.

Return

the rendered string form.

Parameters

input

the element to coerce; may be null.