jbeder / yaml-cpp

A YAML parser and emitter in C++
MIT License
4.91k stars 1.78k forks source link

How to Store String with double quotes in a YAML::Node #1210

Closed R3D454 closed 10 months ago

R3D454 commented 10 months ago

I try to store a string with double qoutes in a yaml file but when i do

node["spec"]["containers"][0]["imagePullPolicy"] = "\"Always\"";

it stores the backslashes to.

I also tried node["spec"]["containers"][0]["imagePullPolicy"] = R"("Always")"; with no success

jbeder commented 10 months ago

Looks like you asked this on stack overflow? Try to put more detail on your question over there. I'll close this one.

R3D454 commented 10 months ago

I think this could be a missing functionality to fullfill the yaml specification.

jbeder commented 10 months ago

If you think so, try to phrase this as a bug, not a request for help.