Toml Decoder
Describes how TOML values are to be decoded into Kotlin model types. decode, get, etc. all accept an optional TomlDecoder
to customize their behavior. If no custom decoder is given, TomlDecoder.default is used.
If you intend to both encode and decode TOML, can get by with custom mappings, and don't need the full power of custom decoding functions, you should probably use TomlTranscoder instead.
Types
Functions
Returns a copy of the target TOML decoder, extended with zero or more additional custom decoder functions. A custom decoder function is a function from a TomlValue and a KType representing a target type, to that target type. Custom decoder functions are associated with a KClass representing that target type.
Returns a copy of the receiver TOML decoder extended with a single custom decoder function, without having to manually specify its target type.
Returns a copy of the receiver TOML decoder extended with a single custom decoder function, without having to manually specify its target type. The custom decoder function may make decoding decisions based on the KType
corresponding to the decoder target type.
Returns a copy of the receiver TOML decoder, extended with a custom property mapping for the type T
, where T
is any class with a primary constructor.
Returns a copy of the receiver TOML decoder, extended with a custom property mapping for the type T
. Mappings are given on the form "tomlName" to "kotlinName"
.