with Mapping
inline fun <T : Any> withMapping(vararg mapping: Pair<KotlinName, TomlName>): TomlEncoder
Content copied to clipboard
Returns a copy of the receiver TOML encoder, extended with a custom property mapping for the type T
. Mappings are given on the form "kotlinName" to "tomlName"
.
See TomlDecoder.withMapping for more information about custom mappings.
fun <T : Any> withMapping(kClass: KClass<T>, vararg mapping: Pair<KotlinName, TomlName>): TomlEncoder
Content copied to clipboard
Returns a copy of the receiver TOML encoder, extended with a custom property mapping for the type indicated by the given KClass
. Mappings are given on the form "kotlinName" to "tomlName"
.
See TomlDecoder.withMapping for more information about custom mappings.