English | 简体中文

api-docs / me.liuwj.ktorm.jackson

Package me.liuwj.ktorm.jackson

Jackson extension module for Ktorm, providing json serialization for entity objects and json SQL type.

Types

NameSummary

JsonSqlType

class JsonSqlType<T : Any> : SqlType<T>

SqlType implementation that provides JSON data type support via Jackson framework.

KtormModule

class KtormModule : Module

Jackson Module implementation that supports serializing Ktorm’s entity objects in JSON format.

Properties

NameSummary

sharedObjectMapper

val sharedObjectMapper: ObjectMapper

A shared ObjectMapper instance which is used as the default mapper of json SQL type.

Functions

NameSummary

json

fun <E : Any, C : Any> BaseTable<E>.json(
    name: String,
    typeRef: TypeReference<C>,
    mapper: ObjectMapper = sharedObjectMapper
): BaseTable.ColumnRegistration<C, E>

Define a column typed of JsonSqlType.