http4k / org.http4k.format / ConfigurableMoshi


open class ConfigurableMoshi : AutoMarshallingJson (source)


Name Summary
<init> ConfigurableMoshi(builder: Builder)


Name Summary
asA open fun <T : Any> asA(input: String, target: KClass<T>): T
fun <T : Any> asA(s: String): T
asJsonString open fun asJsonString(input: Any): String
fun <T : Any> asJsonString(t: T, c: KClass<T>): String

Inherited Functions

Name Summary
asA fun <T : Any> String.asA(target: KClass<T>): T
asInputStream fun asInputStream(input: Any): InputStream

Companion Object Functions

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

Extension Functions

Name Summary
with fun <T> T.with(vararg modifiers: (T) -> T): T


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