Toml Value
Kotlin representation of a TOML value. A full TOML document is always represented as a TomlValue.Map.
You can either traverse this representation manually, access individual properties using TomlValue.get, or decode the whole thing into a data class of your choice using TomlValue.decode.
TomlValue.from can be used to obtain a TomlValue
from an input TOML document in the form of a String, java.nio.file.Path, or java.io.InputStream.
Types
Inheritors
Extensions
Decodes the receiver TOML value to the type indicated by type parameter T
using the default TOML decoder. If the value can't be decoded into the target type, a TomlException.DecodingError is thrown.
Decodes the receiver TOML value into a value of the type corresponding to the given KType
. T
and type
should correspond to the same type, or the behavior of decode
is undefined.
Decodes the receiver TOML value into a value of type T
, using the given custom decoder.
Decodes the receiver TOML value into a value of the type corresponding to the given KType
, using the given custom decoder. T
and type
should correspond to the same type, or the behavior of decode
is undefined.
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 targetKType
. targetKType
and T
should correspond to the same type, or the behavior of get
is undefined.
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.