ConfigurableJackson

open class ConfigurableJackson(val mapper: ObjectMapper, val defaultContentType: ContentType = APPLICATION_JSON) : AutoMarshallingJson<JsonNode>

Inheritors

Constructors

Link copied to clipboard
constructor(mapper: ObjectMapper, defaultContentType: ContentType = APPLICATION_JSON)

Properties

Link copied to clipboard
open override val defaultContentType: ContentType
Link copied to clipboard
val mapper: ObjectMapper

Functions

Link copied to clipboard
open fun <T : JsonNode> array(value: T): JsonNode
open fun <T : JsonNode> array(value: Iterable<T>): JsonNode
Link copied to clipboard
inline fun <T : Any> asA(input: InputStream): T
inline fun <T : Any> asA(input: String): T
fun <T : Any> String.asA(target: KClass<T>): T
fun <T : Any> JsonNode.asA(target: KClass<T>): T
inline fun <T : Any> JsonNode.asA(): T
open override fun <T : Any> asA(j: JsonNode, target: KClass<T>): T
open override fun <T : Any> asA(input: InputStream, target: KClass<T>): T
open override fun <T : Any> asA(input: String, target: KClass<T>): T
Link copied to clipboard
open override fun JsonNode.asCompactJsonString(): String
Link copied to clipboard
Link copied to clipboard
open override fun asFormatString(input: Any): String
Link copied to clipboard
open override fun asInputStream(input: Any): InputStream
Link copied to clipboard
open override fun <T : Iterable<JsonNode>> T.asJsonArray(): JsonNode
Link copied to clipboard
fun Any.asJsonObject(): JsonNode
open override fun <LIST : Iterable<Pair<String, JsonNode>>> LIST.asJsonObject(): JsonNode
open override fun String.asJsonObject(): JsonNode
open override fun asJsonObject(input: Any): JsonNode
Link copied to clipboard
open override fun BigDecimal?.asJsonValue(): JsonNode
open override fun BigInteger?.asJsonValue(): JsonNode
open override fun Boolean?.asJsonValue(): JsonNode
open override fun Double?.asJsonValue(): JsonNode
open override fun Int?.asJsonValue(): JsonNode
open override fun Long?.asJsonValue(): JsonNode
open override fun String?.asJsonValue(): JsonNode
Link copied to clipboard
open override fun JsonNode.asPrettyJsonString(): String
Link copied to clipboard
fun <T : Any, V : Any> String.asUsingView(t: KClass<T>, v: KClass<V>): T
Link copied to clipboard
inline fun <T : Any> Body.Companion.auto(description: String? = null, contentNegotiation: ContentNegotiation = None, contentType: ContentType = defaultContentType): BiDiBodyLensSpec<T>
Link copied to clipboard
inline fun <T : Any> autoBody(description: String? = null, contentNegotiation: ContentNegotiation = None, contentType: ContentType = defaultContentType): BiDiBodyLensSpec<T>
Link copied to clipboard
inline fun <IN : Any, OUT : Any> autoLens(lens: BiDiLensSpec<IN, String>): BiDiLensSpec<IN, OUT>
Link copied to clipboard
inline fun <T : Any, V : Any> Body.Companion.autoView(description: String? = null, contentNegotiation: ContentNegotiation = None, contentType: ContentType = APPLICATION_JSON): BiDiBodyLensSpec<T>
Link copied to clipboard
open fun body(description: String?, contentNegotiation: ContentNegotiation): BiDiBodyLensSpec<JsonNode>
Link copied to clipboard
open override fun bool(value: JsonNode): Boolean
Link copied to clipboard
open fun boolean(value: Boolean): JsonNode
Link copied to clipboard
open fun compact(node: JsonNode): String
Link copied to clipboard
open fun compactify(input: String): String
Link copied to clipboard
inline fun <IN : Any, OUT : Any> convert(input: IN): OUT
Link copied to clipboard
open override fun decimal(value: JsonNode): BigDecimal
Link copied to clipboard
open override fun elements(value: JsonNode): Iterable<JsonNode>
Link copied to clipboard
open override fun fields(node: JsonNode): List<Pair<String, JsonNode>>
Link copied to clipboard
open override fun integer(value: JsonNode): Long
Link copied to clipboard
open operator fun <T> invoke(fn: Json<JsonNode>.() -> T): T
Link copied to clipboard
inline operator fun <T : Any, R : HttpMessage> ConfigurableJackson.invoke(item: T): (R) -> R
inline operator fun <T : Any> ConfigurableJackson.invoke(msg: HttpMessage): T
Link copied to clipboard
inline fun <T : Any> HttpMessage.json(): T

Convenience function to read an object as JSON from the message body.

inline fun <T : Any, R : HttpMessage> R.json(t: T): R

Convenience function to write the object as JSON to the message body and set the content type.

open fun <IN : Any> BiDiLensSpec<IN, String>.json(): BiDiLensSpec<IN, JsonNode>
open fun Body.Companion.json(description: String?, contentNegotiation: ContentNegotiation): BiDiBodyLensSpec<JsonNode>
Link copied to clipboard
open fun <IN : Any> jsonLens(spec: BiDiLensSpec<IN, String>): BiDiLensSpec<IN, JsonNode>
Link copied to clipboard
open fun nullNode(): JsonNode
Link copied to clipboard
open fun number(value: BigDecimal): JsonNode
open fun number(value: BigInteger): JsonNode
open fun number(value: Double): JsonNode
open fun number(value: Int): JsonNode
open fun number(value: Long): JsonNode
Link copied to clipboard
open fun obj(): JsonNode
open fun <T : JsonNode> obj(vararg fields: Pair<String, T>): JsonNode
open fun <T : JsonNode> obj(value: Iterable<Pair<String, T>>): JsonNode
Link copied to clipboard
open fun parse(input: String): JsonNode
Link copied to clipboard
open fun prettify(input: String): String
Link copied to clipboard
open fun pretty(node: JsonNode): String
Link copied to clipboard
open fun string(value: String): JsonNode
Link copied to clipboard
open override fun text(value: JsonNode): String
Link copied to clipboard
open override fun textValueOf(node: JsonNode, name: String): String?
Link copied to clipboard
open override fun typeOf(value: JsonNode): JsonType
Link copied to clipboard