Package-level declarations
Types
A bidirectional TOML transcoder, capable of converting TomlValues into Kotlin values, and vice versa.
Functions
Like decode, but fills in any values missing from the input stream with values from the given defaultValue.
Like decode, but fills in any values missing from the input file with values from the given defaultValue.
Like decode, but fills in any values missing from the input string with values from the given defaultValue.
Delegate the handling of the given type to the given mapper. Overrides any previous configuration for that type, and will be overridden in turn by any subsequent configuration.
Serializes given value into a valid TOML document and writes it to the given OutputStream. If value does not serialize to a valid TOML document (i.e. a map of zero or more keys), an TomlException.SerializationError is thrown.
Serializes given value into a valid TOML document and writes it to the given Appendable. If value does not serialize to a valid TOML document (i.e. a map of zero or more keys), an TomlException.SerializationError is thrown.
Serializes given value into a valid TOML document and writes it to the file indicated by the given Path. If value does not serialize to a valid TOML document (i.e. a map of zero or more keys), an TomlException.SerializationError is thrown.
Encodes the given value into a valid TOML document. If value does not serialize to a valid TOML document (i.e. a map of zero or more keys), an TomlException.SerializationError is thrown.
Encodes the given value into a valid TOML document and serializes it into a string. If value does not serialize to a valid TOML document (i.e. a map of zero or more keys), an TomlException.SerializationError is thrown.
Look up the value(s) at the given path in the receiver TOML structure, then decode them into the type given by the type parameter T
. If decoding is not possible, a TomlException.DecodingError is thrown. If there is no value at the given path, null
is returned.
Look up the value(s) at the given path in the receiver TOML structure, then decode them into the type given by T
using the given custom TOML decoder.
Look up the value(s) at the given path in the receiver TOML structure, then decode them into the type given by targetKType
using the given custom TOML decoder. targetKType
and T
should correspond to the same type, or the behavior of get
is undefined.
Creates a new TOML mapper with the given configuration. In the interest of efficiency, consider creating a mapper once and then keeping it around for the duration of your program, rather than re-creating it every time you need to process a TOML value.
Creates a mapper which inherits all its configuration from the given baseMapper.