NetYaml is a .Net library providing managed bindings for the LibYAML native YAML library.
The API is intended to be unobtrusive and loosely-typed.
Example Yaml.Parse usage:
stringyaml=@"---x: - a- by: f: [g,h] i: jk";vardoc=Yaml.Parse(yaml).First();Console.WriteLine(doc["y"]["f"][0]);// prints 'g'Example Yaml.Dump usage:
vardoc=newYDocument(newYMapping(newDictionary<YScalar,YNode>{{"x",newYSequence(newYScalar("a"),newYScalar("b"))},{"y",newYMapping(newDictionary<YScalar,YNode>{{"f",newYSequence(newYScalar("g"),newYScalar("h"))},{"i",newYScalar("jk")}})},}));stringyaml=Yaml.Dump(doc);Console.WriteLine(yaml);// prints the YAML from the above parse exampleCopyright (c) 2011 Harry Wilkinson. See LICENSE for details.
LibYAML is Copyright (c) 2006 Kirill Simonov.