luaYAML is a Lua 5.1 binding for syck, a fast, spiffy YAML parser.
First, you'll need the syck library.
Once you've installed syck, download luaYAML from luaforge at http://luaforge.net/frs/?group_id=374&release_id=1027
untar the archive, edit the Makefile to match your Lua installation, run make,and make install. Pretty standard fare stuff.
yaml_string.file_path.obj. If optional parameter io is given, writes the YAML dump string to the I/O stream io.obj to file at file_path.
luaYAML installs two modules - yaml and syck. You'll be wanting to use yaml.
require"yaml"
local yaml_string=[[---
- hello
- 38.9
- {foo: bar, b1: b2}
]]
local x = yaml.load(yaml_string)
--[[
x == {
"hello",
38.9,
{
foo="bar",
b1="b2"
}
}
]]--
--and so on...