decode

inline fun <T> decode(tomlValue: TomlValue): T

Decodes the receiver TOML value to the type indicated by type parameter T using the default TOML decoder. If the value can't be decoded into the target type, a cc.ekblad.toml.model.TomlException.DecodingError is thrown.


fun <T> decode(targetKType: KType, tomlValue: TomlValue): T
fun <T> decode(    targetKType: KType,     tomlValue: TomlValue,     defaultValue: T): T