Esc

write_toml

procedureextensionsince 0.36.1Source
  • macOS: write_toml works on macOS
  • Linux: write_toml works on Linux
  • Windows: write_toml works on Windows
  • Wasm: write_toml works on Wasm

Writes a deterministic semantic TOML document. Comments/layout are not preserved. A table inside a table is written under a [header] and a nonempty array of tables under [[header]], after the table's own key = value lines (an empty table is a bare [header], as in the typed encoder). A table inside any other array stays inline. Example: text, error := write_toml(doc.root); defer free(text);

Signature

write_toml :: (
    root: *Toml_Value,
    options := Toml_Options.{}
) -> (string, Toml_Error)