ktor
ktor copied to clipboard
Adds support for custom jackson mapper and lazy initialization
Subsystem Client/Server, related modules
Motivation Current implementation of jackson content negotiation does not allow to provide a custom mapper instance or to lazily initialize the instance to improve startup time.
Solution The initializer function for jackson support now allows to provide a custom mapper provider and to enable lazy initlialization
Lazy initlialization greatly improves startup time for ktor servers. Especially if jackson mapper is used. Would it be possible to allow lazily register a converter that is actually created once it is first used?
@frederic-kneier You are right, it's useful for servers. Do you mind rebasing this PR to the latest main
branch? Please note that JacksonConverter
was moved to :ktor-shared:ktor-serialization:ktor-serialization-jackson
module.