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 的程序。重要数据可以存储在多个可能的键中。为简单起见,假设键的名称可以是“A”或“B”。我不知道它会是哪个,我也不知道该值是字符串、整数还是数组。我只想将“A”或“B”的值保存为字符串以供以后使用。有没有办法在 cJSON 中做到这一点,尤其是在数组的情况下?