Hello,
I fetched http data from URL using CURL and get in into array...but my objective display data in list view any one please help me with example...
Here I attached my sample code...
void printParsedList(Eina_List * jsonlist, int level)
{
Eina_List *l;
void *list_data;
int i=0;
EINA_LIST_FOREACH(jsonlist, l, list_data)
{
......
......
}
eina_list_free(jsonlist);
}
static void parseArray_clicked_cb(void *data)
{
JsonParser *jsonParser;
jsonParser = json_parser_new ();
guint nested_objects = G_N_ELEMENTS (data);
LOGI("ParseNestedObjects size %d",n_test_nested_objects);
for (int i = 0; i < nested_objects; i++)
{
GError *error = NULL;
if (!json_parser_load_from_data (jsonParser, data[i], -1, &error))
{
LOGI("ParseNestedObjects Error");
g_error_free (error);
}
else
{
int level =1;
Eina_List *jsonList = NULL;
jsonList =ParseJsonEntity(json_parser_get_root (jsonParser),false);
printParsedList(jsonList,level);
}
}
g_object_unref(jsonParser);
}
Required XML to list view from array buf[].