Json::Value root;
	root["Ret"] = Json::Value(0);
	root["Err"] = Json::Value("");
	Json::Value root2;
	root2["Ret2"] = Json::Value(0);
	root2["Err2"] = Json::Value("");
	root["root2"] = root2;

	Json::Value rootlist;
	for (int i = 0; i < 5; i++)
	{
		Json::Value temp;
		temp["hello"] = Json::Value(i);
		rootlist.append(temp);
	}
	root["array"] = rootlist;



	sResult = root.toStyledString();

json 示例

相关文章:

  • 2021-08-12
  • 2021-11-20
  • 2021-11-21
  • 2021-12-03
  • 2021-07-04
  • 2021-06-17
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-05
  • 2021-12-15
  • 2022-12-23
  • 2022-12-23
  • 2022-02-02
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案