Skip to content

Instantly share code, notes, and snippets.

@lankydan lankydan/Server.kt
Created Aug 12, 2019

What would you like to do?
Corda + Ktor - jackson
fun ContentNegotiation.Configuration.cordaJackson(proxy: CordaRPCOps) {
val mapper: ObjectMapper = JacksonSupport.createDefaultMapper(proxy)
mapper.apply {
setDefaultPrettyPrinter(DefaultPrettyPrinter().apply {
indentObjectsWith(DefaultIndenter(" ", "\n"))
val converter = JacksonConverter(mapper)
register(ContentType.Application.Json, converter)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.