-
I have a utility which imports and exports configurations to yaml; if for instance the following code ryml::Tree yaml_tree_out;
ryml::NodeRef root = yaml_tree_out.rootref();
root |= ryml::MAP;
ryml::NodeRef config = root["Config"];
config |= ryml::MAP;
config["user_name"] << "#hello";
config["user_full_name"] << "Johnny Appleseed";
config["failed_logon_attempts"] << 0;
produces the following yaml upon emission: Config:
user_name: '#johnny'
user_full_name: Johnny Appleseed
failed_logon_attempts: 0 Now in very rare, and irreproducible cases (likely due to version control text whitespace reformatting); the parser is capable of recognising #johnny as the user_name without the surrounding quotes. For this exact reason I stipulate that user provided configurations must be quote wrapped. I would like all fields in the configurations I export to them to conform to this as well.. Is there anyway this can be done? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can use the incoming style flags for those nodes. They are tagged _WIP to indicate that it's not ready yet, but for your purpose it should work. |
Beta Was this translation helpful? Give feedback.
You can use the incoming style flags for those nodes. They are tagged _WIP to indicate that it's not ready yet, but for your purpose it should work.