Snow Wang
Snow Wang

Reputation: 41

How to emit a string with quotes using 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.

Upvotes: 3

Views: 1321

Answers (1)

Jesse Beder
Jesse Beder

Reputation: 34054

YAML::Emitter out;
// ...
out << YAML::DoubleQuoted << "August 10, 2011 01:37:52";

Upvotes: 3

Related Questions