可以用yaml-cpp解析YAML格式的字符串吗?
没有YAML::Parser::Parser(std::string&)构造函数。(我通过libcurl从http-server获取了一个YAML字符串。)
发布于 2010-05-12 01:50:34
尝试使用stringstream
std::string s = "name: YAML from libcurl";
std::stringstream ss(s);
YAML::Parser parser(ss);发布于 2012-04-06 02:41:05
在新版本中,您可以直接解析字符串(请参阅here):
YAML::Node node = YAML::Load("[1, 2, 3]");https://stackoverflow.com/questions/2813030
复制相似问题