代码:
#include#include int main() { const char* json_str = "{"A":22,"B":"1111111111","C":12345}"; cJSON* item = cJSON_Parse(json_str); cJSON *node = NULL; node = item->child; while (node != NULL) { printf("%sn",node->string); node = node->next; } return 0; }
运行结果如下:
A
B
C



