Package dev.petuska.kon.core

Types

KARR
Link copied to clipboard
object KARR

Array builder hook. Useless by its own...

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

A MutableList to represent a JSON object.

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

A wrapper around MutableMap to represent a JSON object

KON
Link copied to clipboard
typealias KON = TypedKON<Any?>

A MutableMap to represent a JSON object.

TypedKObject
Link copied to clipboard
interface TypedKObject<V> : MutableMap<String, V>

A wrapper around MutableMap to represent a JSON object

TypedKON
Link copied to clipboard
typealias TypedKON<V> = MutableMap<String, V>

A MutableMap to represent a JSON object.

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 <V> kobj(base: TypedKON<V> = mutableMapOf(), obj: TypedKObject<V>.() -> Unit = {}): TypedKObject<V>
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
fun KON.toJS(): Json

Converts a given KON to JavaScript Json

Properties

karr
Link copied to clipboard
val karr: KARR

Array builder hook. Useless by its own...