encode
Encodes the given Kotlin value to as into a TomlValue using the receiver TomlEncoder. If the value can't be encoded, a cc.ekblad.toml.model.TomlException.EncodingError is thrown.
Note that as TOML does not have the concept of null
, any null
values present in lists, maps or data classes are not included in the encoding.