Put YAML::Newline
just after YAML::BeginMap
to get the newline after the -
but before the first entry of the map:
out << YAML::BeginMap;
out << YAML::Newline;
out << YAML::Key << "name";
out << YAML::Value << str;
out << YAML::Key << "value";
out << YAML::Value << d_str;
out << YAML::EndMap;