Added emitting for a YAML::Node (instead of the ad-hoc std::ostream overload) so it'll actually emit valid YAML always

This commit is contained in:
Jesse Beder
2009-07-10 23:39:14 +00:00
parent 6c8600ab52
commit 3e0179fd6e
13 changed files with 136 additions and 202 deletions

View File

@@ -14,6 +14,9 @@ int main(int argc, char **argv)
while(parser) {
YAML::Node doc;
parser.GetNextDocument(doc);
YAML::Emitter emitter;
emitter << doc;
std::cout << emitter.c_str() << "\n";
}
} catch(const YAML::Exception& e) {
std::cerr << e.what() << "\n";