how to set yaml-cpp node style?
问题 I have a vector3 class. class vector3 { float x, y, z; } node["x"] = vector3.x; node["y"] = vector3.y; node["z"] = vector3.z; The result is x: 0 y: 0 z: 0 I want the result to be: {x: 0, y: 0, z: 0} If use the old API, I can use YAML::Flow to set the style: YAML::Emitter emitter; out << YAML::Flow << YAML::BeginMap << YAML::Key << "x" << YAML::Value << x << YAML::EndMap Using the new API, how can I set the style? I asked this question on a yaml-cpp project issue page: https://code.google.com