api

http4k / org.http4k.format / ConfigurableKlaxon

ConfigurableKlaxon

open class ConfigurableKlaxon : AutoMarshalling

Constructors

Name Summary
<init> ConfigurableKlaxon(klaxon: Klaxon, defaultContentType: ContentType = APPLICATION_JSON)

Properties

Name Summary
defaultContentType val defaultContentType: ContentType

Functions

Name Summary
asA open fun <T : Any> asA(input: String, target: KClass<T>): T
asFormatString open fun asFormatString(input: Any): String
autoBody fun <T : Any> autoBody(description: String? = null, contentNegotiation: ContentNegotiation = ContentNegotiation.None, contentType: ContentType = defaultContentType): BiDiBodyLensSpec<T>

Companion Object Functions

Name Summary
auto fun <T : Any> Body.Companion.auto(description: String? = null, contentNegotiation: ContentNegotiation = ContentNegotiation.None, contentType: ContentType = defaultContentType): BiDiBodyLensSpec<T>
fun <T : Any> WsMessage.Companion.auto(): BiDiWsMessageLensSpec<T>

Inheritors

Name Summary
Klaxon To implement custom JSON configuration, create your own object singleton. Extra mappings can be added before done() is called.object Klaxon : ConfigurableKlaxon