ConfigurableJacksonCsv

open class ConfigurableJacksonCsv(val mapper: CsvMapper, val defaultContentType: ContentType = ContentType.TEXT_CSV)

Inheritors

Constructors

Link copied to clipboard
constructor(mapper: CsvMapper, defaultContentType: ContentType = ContentType.TEXT_CSV)

Properties

Link copied to clipboard
Link copied to clipboard
val mapper: CsvMapper

Functions

Link copied to clipboard
inline fun <T : Any> Body.Companion.auto(description: String? = null, contentNegotiation: ContentNegotiation = ContentNegotiation.None): BiDiBodyLensSpec<List<T>>
Link copied to clipboard
inline fun <T : Any> autoBody(description: String? = null, contentNegotiation: ContentNegotiation = ContentNegotiation.None, contentType: ContentType = defaultContentType, schema: CsvSchema = defaultSchema<T>()): BiDiBodyLensSpec<List<T>>
Link copied to clipboard
inline fun <T : Any> HttpMessage.csv(): List<T>

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

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

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

Link copied to clipboard
inline fun <T> defaultSchema(): CsvSchema
Link copied to clipboard
inline fun <T : Any> readCsv(input: String, schema: CsvSchema = defaultSchema<T>()): List<T>
Link copied to clipboard
fun <T : Any> readerFor(type: KClass<T>, schema: CsvSchema): (String) -> List<T>
Link copied to clipboard
inline fun <T : Any> writeCsv(input: List<T>, schema: CsvSchema = defaultSchema<T>()): String
Link copied to clipboard
fun <T : Any> writerFor(type: KClass<T>, schema: CsvSchema): (List<T>) -> String