【发布时间】:2018-07-10 10:33:04
【问题描述】:
我在使用jsoncpp 时遇到问题。代码如下:
Json::Value content;
for ( int i=0; i < len; ++i)
{
content["res"].append(strs[i]);
}
我的情况是,当我的字符串向量 strs 只有一个元素时,最终的 json 字符串如下:
"res":"a"
但是,我期待的是:
"res":["a"]
希望有人把我拉出来,谢谢大家!!!
【问题讨论】: