English | 简体中文

api-docs / me.liuwj.ktorm.jackson / json

json

fun <C : Any> BaseTable<*>.json(
    name: String,
    typeRef: TypeReference<C>,
    mapper: ObjectMapper = sharedObjectMapper
): Column<C>
(source code)

Define a column typed of JsonSqlType.

Parameters

name - the column’s name.

typeRef - the generic type information of this column, generally created by me.liuwj.ktorm.schema.typeRef.

mapper - the object mapper used to serialize column values to JSON strings and deserialize them.

Return
the registered column.