Package dev.petuska.kon

Types

KARR
Link copied to clipboard
common
object KARR

Array builder hook. Useless by its own...

KArray
Link copied to clipboard
common
interface KArray<T> : MutableList<T>

A MutableList to represent a JSON object.

KObject
Link copied to clipboard
common
interface KObject : MutableMap<String, Any?>

A wrapper around MutableMap to represent a JSON object

KON
Link copied to clipboard
common
typealias KON = MutableMap<String, Any?>

A MutableMap to represent a JSON object.

KONBuilderDsl
Link copied to clipboard
common
annotation class KONBuilderDsl

Marks DSLs with no side effects that build entities

KONSetterDsl
Link copied to clipboard
common
annotation class KONSetterDsl

Marks DSLs with side effects that build and sets entities

Functions

karr
Link copied to clipboard
common
inline fun <T> karr(vararg items: T): KArray<T>

Builds an array. Overrides Any::toString to return JSON array.

kobj
Link copied to clipboard
common
inline fun kobj(base: KON = mutableMapOf(), obj: KObject.() -> Unit = {}): KObject

Builds an object. Overrides Any::toString to return JSON object notation.

toJS
Link copied to clipboard
js
fun KON.toJS(): Json

Converts a given KON to JavaScript Json

Properties

karr
Link copied to clipboard
common
val karr: KARR

Array builder hook. Useless by its own...