toml
The toml namespace — the engine's Luau API reference for toml.
The toml namespace — 2 functions.
globals/toml/encode
globals/toml/encode(root: { [string]: any }) -> string
Encode a Luau table as canonical TOML bytes. Top-level string-keyed sub-tables become section headers ([name]); deeper string-keyed tables become dotted sections ([a.b]). Sequence tables are emitted as inline arrays, and string-keyed tables in value position (e.g. array elements) as inline tables ({ k = v }). Section + key order is alphabetical so the same input always produces the same bytes.
globals/toml/parse
globals/toml/parse(src: string) -> { [string]: any }
Parse a TOML document into a nested Luau table. Sections ([a.b]) become nested tables; key/value pairs become entries on the current section (or root if before any section header). Throws with the line number on syntax errors.