Keshav
unread,Apr 23, 2013, 2:57:17 AM4/23/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jansso...@googlegroups.com
Hi,
In this code, I am passing json string to json_loads() function. When I try to extract number of elements in json, json_array_size(root) function is returning zero. Could you find out any possible error here?
json_error_t error;
json_t *root = json_loads(jsonStr, 0, &error);
printf("Array size: %d\n", json_array_size(root));
if(!root)
{
printf("error: on line %d: %s\n", error.line, error.text);
return 1;
}