如何使用 json-spirit 在 C++ 中读取 json 字符串?我阅读了演示代码。我发现:
const Address addrs[5] = { { 42, "East Street", "Newtown", "Essex", "England" },
{ 1, "West Street", "Hull", "Yorkshire", "England" },
{ 12, "South Road", "Aberystwyth", "Dyfed", "Wales" },
{ 45, "North Road", "Paignton", "Devon", "England" },
{ 78, "Upper Street", "Ware", "Hertfordshire", "England" } };
我可以将字符串转换为 json 对象吗?
char* jsonStr = "{'name', 'Tom'}";