Closed NikOsint closed 1 year ago
For example, these lines make integers emit with double quotes too:
YAML::Emitter emitter; emitter.SetStringFormat(YAML::EMITTER_MANIP::DoubleQuoted);
Is there a way to fix this so that only strings are emitted with quotes and integers without?
Other problem is that if I add quotes to a string by myself, it is then emitted with another pair of quotes, which looks like this:
"\"some string\""
My goal is to detect, whether a YAML entry is a string or not, by looking at presence of quotes around it (without tags).
Unfortunately, yaml isn't the job for what you're trying to do. This is WAI for yaml-cpp. See the part of the YAML spec that talks about string types.
For example, these lines make integers emit with double quotes too:
Is there a way to fix this so that only strings are emitted with quotes and integers without?
Other problem is that if I add quotes to a string by myself, it is then emitted with another pair of quotes, which looks like this:
My goal is to detect, whether a YAML entry is a string or not, by looking at presence of quotes around it (without tags).