我正在使用 nlohmann/json 库并想要获取 json 数组的长度。图片我有:
[
"test",
"test2"
]
并希望收到长度 (2)。当我尝试 .length() 方法时,它向我显示了这个错误:
using json = using json = class nlohmann::basic_json<>' {aka 'class nlohmann::basic_json<>'} 没有名为 'length 的成员
那么我怎样才能得到这个库中的长度呢?
我正在使用 nlohmann/json 库并想要获取 json 数组的长度。图片我有:
[
"test",
"test2"
]
并希望收到长度 (2)。当我尝试 .length() 方法时,它向我显示了这个错误:
using json = using json = class nlohmann::basic_json<>' {aka 'class nlohmann::basic_json<>'} 没有名为 'length 的成员
那么我怎样才能得到这个库中的长度呢?