小编Dru*_*ide的帖子

boost::ptree 找到了吗?或者如何访问深层数组?C++

我现在已经尝试了太多时间来从 boost 库访问 json_reader ptree。

\n\n

我有一个经常封装的 json 文件:(pseudo-json:)

\n\n
"Foo": {\n  "nameofFoo:"foofoo"\n  "Bar": [{\n    "BarFoo": \n      { BarFooDeep: { \n           BarFooDeepDeep: { \n            "BarFooValue1": 123 \n            "BarFooValue2" : 456\n          }\n        }\n      }\n     "FooBar": [ {\n        "FooBarDeep" :[ {\n           FooBarDeepDeep:[ {\n              FooBarValue1: "ineedthis"\n              FooBarValue2: "andthis"\n              } ]\n           FooBarDeepDeep1:[ {\n              FooBarValue1: "ineedthis"\n              FooBarValue2: "andthis"\n              } ]\n        "FooBarDeep" :[ {\n           FooBarDeepDeep2:[ {\n              FooBarValue1: "ineedthis"\n              FooBarValue2: "andthis"\n              } ]\n           FooBarDeepDeep3:[ {\n              FooBarValue1: "ineedthis"\n              FooBarValue2: "andthis"\n              } ]\nand so on .... won t complete …
Run Code Online (Sandbox Code Playgroud)

json boost boost-propertytree c++11

3
推荐指数
1
解决办法
6035
查看次数

标签 统计

boost ×1

boost-propertytree ×1

c++11 ×1

json ×1