public class JacksonConverter
install(ContentNegotiation) {
register(ContentType.Application.Json, JacksonConverter())
}
to be able to modify the objectMapper (eg. using specific modules and/or serializers and/or
configuration options, you could use the following (as seen in the ktor-samples):
install(ContentNegotiation) {
jackson {
configure(SerializationFeature.INDENT_OUTPUT, true)
registerModule(JavaTimeModule())
}
}
| Constructor and Description |
|---|
JacksonConverter(com.fasterxml.jackson.databind.ObjectMapper objectmapper)
install(ContentNegotiation) {
register(ContentType.Application.Json, JacksonConverter())
}
to be able to modify the objectMapper (eg. using specific modules and/or serializers and/or
configuration options, you could use the following (as seen in the ktor-samples):
install(ContentNegotiation) {
jackson {
configure(SerializationFeature.INDENT_OUTPUT, true)
registerModule(JavaTimeModule()) |
JacksonConverter()
install(ContentNegotiation) {
register(ContentType.Application.Json, JacksonConverter())
}
to be able to modify the objectMapper (eg. using specific modules and/or serializers and/or
configuration options, you could use the following (as seen in the ktor-samples):
install(ContentNegotiation) {
jackson {
configure(SerializationFeature.INDENT_OUTPUT, true)
registerModule(JavaTimeModule()) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
convertForReceive(io.ktor.util.pipeline.PipelineContext<io.ktor.request.ApplicationReceiveRequest,io.ktor.application.ApplicationCall> context,
kotlin.coroutines.experimental.Continuation<java.lang.Object> p) |
java.lang.Object |
convertForSend(io.ktor.util.pipeline.PipelineContext<java.lang.Object,io.ktor.application.ApplicationCall> context,
io.ktor.http.ContentType contentType,
java.lang.Object value,
kotlin.coroutines.experimental.Continuation<java.lang.Object> p) |
public JacksonConverter(com.fasterxml.jackson.databind.ObjectMapper objectmapper)
install(ContentNegotiation) {
register(ContentType.Application.Json, JacksonConverter())
}
to be able to modify the objectMapper (eg. using specific modules and/or serializers and/or
configuration options, you could use the following (as seen in the ktor-samples):
install(ContentNegotiation) {
jackson {
configure(SerializationFeature.INDENT_OUTPUT, true)
registerModule(JavaTimeModule())
}
}
public JacksonConverter()
install(ContentNegotiation) {
register(ContentType.Application.Json, JacksonConverter())
}
to be able to modify the objectMapper (eg. using specific modules and/or serializers and/or
configuration options, you could use the following (as seen in the ktor-samples):
install(ContentNegotiation) {
jackson {
configure(SerializationFeature.INDENT_OUTPUT, true)
registerModule(JavaTimeModule())
}
}
public java.lang.Object convertForSend(io.ktor.util.pipeline.PipelineContext<java.lang.Object,io.ktor.application.ApplicationCall> context,
io.ktor.http.ContentType contentType,
java.lang.Object value,
kotlin.coroutines.experimental.Continuation<java.lang.Object> p)
public java.lang.Object convertForReceive(io.ktor.util.pipeline.PipelineContext<io.ktor.request.ApplicationReceiveRequest,io.ktor.application.ApplicationCall> context,
kotlin.coroutines.experimental.Continuation<java.lang.Object> p)