- jackson($receiver, contentType, block) - Static method in class io.ktor.jackson.JacksonConverterKt
-
Register Jackson converter into ContentNegotiation feature
- JacksonConverter - Class in io.ktor.jackson
-
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(objectmapper) - Constructor for class io.ktor.jackson.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())
- JacksonConverter() - Constructor for class io.ktor.jackson.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())
- JacksonConverterKt - Class in io.ktor.jackson
-