9951 explained code solutions for 126 technologies


luaHow to parse YAML


local yml = require "lyaml"
local tbl = yml.load('sample: yaml')ctrl + c
require "lyaml"

loads lyaml module to work with YAML format

yml.load

parses given YAML string and returns table

'sample: yaml'

sample YAML string to parse

tbl

resulting table with parsed data