Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to emit a string with quotes using yaml-cpp?

Tags:

emit

yaml-cpp

I want to emit a string with quotes using yaml-cpp so it looks like

time_stamp: "August 10, 2011 01:37:52"

in the output yaml file. How do I do it? Thanks.

like image 230
Snow Wang Avatar asked Mar 17 '26 21:03

Snow Wang


1 Answers

YAML::Emitter out;
// ...
out << YAML::DoubleQuoted << "August 10, 2011 01:37:52";
like image 51
Jesse Beder Avatar answered Mar 19 '26 14:03

Jesse Beder