date_created = json_object_get_string
(json_object_object_get(o, "date_created"));
if (date_created)
- strptime(date_created, "%FT%T%z", &bpph->date_created);
+ strptime(date_created, "%FT%T", &bpph->date_created);
status = json_object_get_string(json_object_object_get(o, "status"));
if (status)
json_object_object_add
(json,
+ "self_link",
+ json_object_new_string(bpph->self_link));
+
+ json_object_object_add
+ (json,
"architecture_specific",
json_object_new_boolean(bpph->architecture_specific));
date = malloc(strlen("YY-MM-DDThh:mm:ss+xxx") + 1);
strftime(date,
strlen("YY-MM-DDThh:mm:ss+xxx") + 1,
- "%FT%T%z",
+ "%FT%T",
&bpph->date_created);
json_object_object_add
entries = json_object_new_array();
json_object_object_add(result, "entries", entries);
- for (cur = list; *cur; cur++)
- json_object_array_add(entries, bpph_to_json(*cur));
+ if (list)
+ for (cur = list; *cur; cur++)
+ json_object_array_add(entries, bpph_to_json(*cur));
return result;
}