2011-08-16 12:53:13 +00:00
|
|
|
import std.stdio;
|
2013-12-17 14:09:19 +00:00
|
|
|
import dyaml.all;
|
2011-08-16 12:53:13 +00:00
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
2011-10-15 14:31:23 +00:00
|
|
|
//Read the input.
|
|
|
|
Node root = Loader("input.yaml").load();
|
|
|
|
|
|
|
|
//Display the data read.
|
2011-08-16 12:53:13 +00:00
|
|
|
foreach(string word; root["Hello World"])
|
|
|
|
{
|
|
|
|
writeln(word);
|
|
|
|
}
|
2011-10-22 15:06:32 +00:00
|
|
|
writeln("The answer is ", root["Answer"].as!int);
|
2011-10-15 14:31:23 +00:00
|
|
|
|
|
|
|
//Dump the loaded document to output.yaml.
|
|
|
|
Dumper("output.yaml").dump(root);
|
2011-08-16 12:53:13 +00:00
|
|
|
}
|