Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我通过“json-c/json.h”在 C 中解析 json。
我有结构:section: [ {item: {...}, item: {...}, ..., item: {...}} ]
section: [ {item: {...}, item: {...}, ..., item: {...}} ]
我可以通过以下方式获得 1 件商品:
struct json_object item = json_object_object_get(section, "item");
如何获取项目数量并解析所有项目?