api-docs / org.ktorm.jackson / KtormModule
KtormModule
class KtormModule : Module
(source code)Jackson Module implementation that supports serializing Ktorm’s entity objects in JSON format.
Entity classes in Ktorm are defined as interfaces, and entity objects are created by JDK dynamic proxy.
That’s why Jackson cannot serialize entity objects by default (because they are not normal Java classes).
This module provides the Jackson serialization support for Ktorm.
To enable this module, you need to call the ObjectMapper.registerModule method to register it to Jackson.
You can also call ObjectMapper.findAndRegisterModules to automatically find and register it using JDK
ServiceLoader facility. For more details, please see Jackson’s documentation.
See Also
ObjectMapper.findAndRegisterModules
Constructors
Name | Summary |
---|---|
KtormModule() Jackson Module implementation that supports serializing Ktorm’s entity objects in JSON format. |
Functions
Name | Summary |
---|---|
fun getModuleName(): String | |
fun setupModule(context: SetupContext): Unit | |
fun version(): Version |
Extension Functions
Name | Summary |
---|---|
infix fun <T : Any> T.eq( Equal operator, translated to | |
infix fun <T : Any> T.neq( Not-equal operator, translated to | |
infix fun <T : Any> T.notEq( Not-equal operator, translated to |