Lua TOML library written in Rust
local toml = require "tomlua"
local doc, err = toml.decode[=[
title = "Example"
working = true
]=]
if not doc then
print(err)
end
local src = toml.encode(doc)
print(src)
--[[
title = "Example"
working = true
--]]
Note: Keys may not preserve order when encoded. This is a limitation of the TOML format.
Parses a TOML string into a table. On error returns nil and an error message.
local doc, err = toml.decode "a = 1"
Encodes a table into a TOML string.
local src = toml.encode {a = 1}