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:
jbeder
2009-07-10 23:39:14 +00:00
parent 689c5fa7b7
commit a48191c970
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";