210091a75f
and example with new information.
19 lines
367 B
D
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);
|
|
}
|