jacksonCodec

inline fun <T : Any> jacksonCodec(name: String, mapper: ObjectMapper? = null): JacksonCodec<T>(source)

Builds a JacksonCodec for the requested type T.

Generic type arguments from T are preserved, so codecs such as jacksonCodec<List<User>>() still decode elements as User instead of raw map values.

Return

a JacksonCodec bound to the requested type.

Parameters

T

domain type handled by the codec.

name

human readable identifier used in error messages.

mapper

optional mapper override; defaults to defaultObjectMapper.

See also