-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Milestone
Description
After finishing (#8), want to add a way to iterate over the array "natively". Something like
void callback(void* item)
{
printf("%d ", *(int32_t*)item);
}
// somewhere in main() ...
char* json_string = "{ \"myarray\": [1, 2, 3] }";
struct json_t* json = json_parse_from_string(json_string);
json_foreach(json, "myarray", &callback);
// this should print 1 2 3