Package cc.ekblad.toml.serialization

Functions

Link copied to clipboard
fun TomlValue.Companion.from(stream: InputStream): TomlDocument

Parse the given TOML-formatted input stream into a TOML map.

fun TomlValue.Companion.from(path: Path): TomlDocument

Parse the given TOML-formatted file into a TOML map.

fun TomlValue.Companion.from(string: String): TomlDocument

Parse the given TOML-formatted string into a TOML map.

Link copied to clipboard
fun TomlDocument.write(outputStream: OutputStream)

Serializes the receiver TomlDocument into a valid TOML document and writes it to the given OutputStream.

fun TomlDocument.write(output: Appendable)

Serializes the receiver TomlDocument into a valid TOML document and writes it to the given Appendable.

fun TomlDocument.write(path: Path)

Serializes the receiver TomlDocument into a valid TOML document and writes it to the file represented by the given Path.