int flags)
{
int had_children = 0;
- int ii;
+ size_t ii;
sprintbuf(pb, "[");
if (flags & JSON_C_TO_STRING_PRETTY)
sprintbuf(pb, "\n");
return *result;
}
-int json_object_array_length(struct json_object *jso)
+size_t json_object_array_length(struct json_object *jso)
{
return array_list_length(jso->o.c_array);
}
return array_list_add(jso->o.c_array, val);
}
-int json_object_array_put_idx(struct json_object *jso, int idx,
+int json_object_array_put_idx(struct json_object *jso, size_t idx,
struct json_object *val)
{
return array_list_put_idx(jso->o.c_array, idx, val);
}
struct json_object* json_object_array_get_idx(struct json_object *jso,
- int idx)
+ size_t idx)
{
return (struct json_object*)array_list_get_idx(jso->o.c_array, idx);
}
* @param obj the json_object instance
* @returns an int
*/
-extern int json_object_array_length(struct json_object *obj);
+extern size_t json_object_array_length(struct json_object *obj);
/** Sorts the elements of jso of type json_type_array
*
* @param idx the index to insert the element at
* @param val the json_object to be added
*/
-extern int json_object_array_put_idx(struct json_object *obj, int idx,
+extern int json_object_array_put_idx(struct json_object *obj, size_t idx,
struct json_object *val);
/** Get the element at specificed index of the array (a json_object of type json_type_array)
* @returns the json_object at the specified index (or NULL)
*/
extern struct json_object* json_object_array_get_idx(struct json_object *obj,
- int idx);
+ size_t idx);
/* json_bool type methods */