dyaml/examples/getting_started/main.d
Ferdinand Majerech 210091a75f Fixed a bug which prevented dumping to file. Updated tutorials
and example with new information.
2011-10-15 16:31:23 +02:00

19 lines
367 B
D

import std.stdio;
import yaml;
void main()
{
//Read the input.
Node root = Loader("input.yaml").load();
//Display the data read.
foreach(string word; root["Hello World"])
{
writeln(word);
}
writeln("The answer is ", root["Answer"].get!int);
//Dump the loaded document to output.yaml.
Dumper("output.yaml").dump(root);
}