jbeder / yaml-cpp

A YAML parser and emitter in C++
MIT License
5.09k stars 1.83k forks source link

Switch to turn off emitted comments #1165

Open nathanieltagg opened 1 year ago

nathanieltagg commented 1 year ago

I really love using emitter << Comment << "This is a good day to comment";

However, I've found a use case where I want to emit as plain JSON (and parse with nlohmann::json). It would be convient to have a stream modifier that turns off comments, like emitter << DisableComments