tomlParse TOML configuration files and strings into XS maps.Importcopyimport tomlFunctionstoml.parse(s: str) -> mapParse a TOML string and return a map. Supports strings, integers, floats, booleans, arrays, and sections (as nested maps). Unknown or malformed entries are silently skipped.Examplesscratch.xscopyresetrunimport toml let src = ` [server] host = "localhost" port = 8080 debug = true [database] url = "postgres://localhost/mydb" pool = 5 ` let cfg = toml.parse(src) println(cfg["server"]["host"]) -- localhost println(cfg["server"]["port"]) -- 8080 println(cfg["server"]["debug"]) -- true println(cfg["database"]["pool"]) -- 5 import toml let src = ` [server] host = "localhost" port = 8080 debug = true [database] url = "postgres://localhost/mydb" pool = 5 ` let cfg = toml.parse(src) println(cfg["server"]["host"]) -- localhost println(cfg["server"]["port"]) -- 8080 println(cfg["server"]["debug"]) -- true println(cfg["database"]["pool"]) -- 5Edit this page on GitHub ->