http4k / org.http4k.format / Jackson


object Jackson : ConfigurableJackson (source)

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

Inherited Functions

Name Summary
asA open fun <T : Any> asA(input: String, target: KClass<T>): T
open fun <T : Any> asA(j: JsonNode, target: KClass<T>): T
asCompactJsonString open fun JsonNode.asCompactJsonString(): String
asCompactJsonStringUsingView fun <T : Any, V : Any> T.asCompactJsonStringUsingView(v: KClass<V>): String
asJsonArray open fun <T : Iterable<JsonNode>> T.asJsonArray(): JsonNode
asJsonObject open fun String.asJsonObject(): JsonNode
open fun <LIST : Iterable<Pair<String, JsonNode>>> LIST.asJsonObject(): JsonNode
open fun asJsonObject(input: Any): JsonNode
asJsonValue open fun String?.asJsonValue(): JsonNode
open fun Int?.asJsonValue(): JsonNode
open fun Double?.asJsonValue(): JsonNode
open fun Long?.asJsonValue(): JsonNode
open fun BigDecimal?.asJsonValue(): JsonNode
open fun BigInteger?.asJsonValue(): JsonNode
open fun Boolean?.asJsonValue(): JsonNode
asPrettyJsonString open fun JsonNode.asPrettyJsonString(): String
asUsingView fun <T : Any, V : Any> String.asUsingView(t: KClass<T>, v: KClass<V>): T
bool open fun bool(value: JsonNode): Boolean
decimal open fun decimal(value: JsonNode): BigDecimal
elements open fun elements(value: JsonNode): Iterable<JsonNode>
fields open fun fields(node: JsonNode): Iterable<Pair<String, JsonNode>>
integer open fun integer(value: JsonNode): Long
text open fun text(value: JsonNode): String
textValueOf open fun textValueOf(node: JsonNode, name: String): String?
typeOf open fun typeOf(value: JsonNode): JsonType

Extension Functions

Name Summary
hasBody fun <NODE> Json<NODE>.hasBody(expected: NODE): Matcher<HttpMessage>
fun <NODE> Json<NODE>.hasBody(expected: Matcher<NODE>): Matcher<HttpMessage>
fun <NODE> Json<NODE>.hasBody(expected: String): Matcher<HttpMessage>
with fun <T> T.with(vararg modifiers: (T) -> T): T