Toml Transcoder
A bidirectional TOML transcoder, capable of converting TomlValues into Kotlin values, and vice versa.
A transcoder is intended to make your life easier by keeping custom mappings in sync between your encoder and decoder. Unless you need custom en/decoder functions, using a transcoder instead of a separate encoder and decoder is highly recommended.
Constructors
TomlTranscoder
Link copied to clipboard
Types
Functions
with Mapping
Link copied to clipboard
inline fun <T : Any> withMapping(vararg mapping: Pair<TomlName, KotlinName>): TomlTranscoder
Content copied to clipboard
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"
.
fun <T : Any> withMapping(kClass: KClass<T>, vararg mapping: Pair<TomlName, KotlinName>): TomlTranscoder
Content copied to clipboard
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"
.