decode

fun <T> TomlDecoder.decode(value: TomlValue, target: KType): T

Decode the given value into the given target type. Behavior is undefined if T is not equal to or a superclass of target.