【发布时间】:2014-11-22 06:06:14
【问题描述】:
我有一个 JSON 对象说:
Json::Value temp;
temp["example1"] = "first";
这将被表示为
{
"example1" : "first"
}
现在如果我想在上面的对象中添加另一个对象而不使用索引方法,我该怎么做?例如:
{
"example1" : "first",
"example2" : "second"
}
但避免使用语法
temp["example2"] = "second";
JsonCpp 中是否有与push_back() 等效的(如在 C++ 向量/列表中)?
【问题讨论】:
标签: jsoncpp