withMapping

inline fun <T : Any> withMapping(vararg mapping: Pair<TomlName, KotlinName>): TomlTranscoder

Returns a copy of the receiver TOML transcoder, extended with a custom property mapping for the type T. Mappings are given on the form "tomlName" to "kotlinName".

See TomlDecoder.withMapping for more information about custom mappings.


fun <T : Any> withMapping(kClass: KClass<T>, vararg mapping: Pair<TomlName, KotlinName>): TomlTranscoder

Returns a copy of the receiver TOML transcoder, extended with a custom property mapping for the type represented by the given KClass. Mappings are given on the form "tomlName" to "kotlinName".

See TomlDecoder.withMapping for more information about custom mappings.