Package dev.petuska.kon

Types

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

A MutableList to represent a JSON object.

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

A wrapper around MutableMap to represent a JSON object

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

A MutableMap to represent a JSON object.

KONBuilderDsl
Link copied to clipboard
annotation class KONBuilderDsl

Marks DSLs with no side effects that build entities

KONSetterDsl
Link copied to clipboard
annotation class KONSetterDsl

Marks DSLs with side effects that build and sets entities

Functions

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

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

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

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