mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 04:41:16 +00:00
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:
@@ -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";
|
||||
|
Reference in New Issue
Block a user