# JsonColumnType

open class JsonColumnType<T : Any>(val serialize: (T) -> String, val deserialize: (String) -> T) : ColumnType<T> , JsonColumnMarker

Column for storing JSON data, either in non-binary text format or the vendor's default JSON type format.

#### Samples

json

#### Inheritors

JsonBColumnType

## Constructors

JsonColumnType
Link copied to clipboard
constructor(serialize: (T) -> String, deserialize: (String) -> T)

## Properties

deserialize
Link copied to clipboard
val deserialize: (String) -> T

Decode a JSON String to an object of type T.

nullable
Link copied to clipboard
open override var nullable: Boolean
serialize
Link copied to clipboard
val serialize: (T) -> String

Encode an object of type T to a JSON String.

usesBinaryFormat
Link copied to clipboard
open override val usesBinaryFormat: Boolean = false

## Functions

equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open override fun hashCode(): Int
nonNullValueAsDefaultString
Link copied to clipboard
open override fun nonNullValueAsDefaultString(value: T): String
nonNullValueToString
Link copied to clipboard
open override fun nonNullValueToString(value: T): String
notNullValueToDB
Link copied to clipboard
open override fun notNullValueToDB(value: T): Any
parameterMarker
Link copied to clipboard
open override fun parameterMarker(value: T?): String
readObject
Link copied to clipboard
open fun readObject(rs: ResultSet, index: Int): Any?
setParameter
Link copied to clipboard
open override fun setParameter(stmt: PreparedStatementApi, index: Int, value: Any?)
sqlType
Link copied to clipboard
open override fun sqlType(): String
toString
Link copied to clipboard
open override fun toString(): String
validateValueBeforeUpdate
Link copied to clipboard
open fun validateValueBeforeUpdate(value: T?)
valueAsDefaultString
Link copied to clipboard
open fun valueAsDefaultString(value: T?): String
valueFromDB
Link copied to clipboard
open override fun valueFromDB(value: Any): T
valueToDB
Link copied to clipboard
open fun valueToDB(value: T?): Any?
valueToString
Link copied to clipboard
open override fun valueToString(value: T?): String