Struct
JsonArray
Description [src]
struct JsonArray {
/* No available fields */
}
JsonArray is the representation of the array type inside JSON.
A JsonArray contains JsonNode elements, which may contain
fundamental types, other arrays or objects.
Since arrays can be arbitrarily big, copying them can be expensive; for
this reason, they are reference counted. You can control the lifetime of a JsonArray using json_array_ref() and json_array_unref().
To append an element, use json_array_add_element().
To extract an element at a given index, use json_array_get_element().
To retrieve the entire array in list form, use json_array_get_elements().
To retrieve the length of the array, use json_array_get_length().
Instance methods
json_array_add_double_element
Conveniently adds the given floating point value into an array.
since: 0.8
json_array_dup_element
Retrieves a copy of the element at the given position in the array.
since: 0.6
json_array_foreach_element
Iterates over all elements of an array, and calls a function on each one of them.
since: 0.8
json_array_get_array_element
Conveniently retrieves the array at the given position inside an array.
since: 0.8
json_array_get_boolean_element
Conveniently retrieves the boolean value of the element at the given position inside an array.
since: 0.8
json_array_get_double_element
Conveniently retrieves the floating point value of the element at the given position inside an array.
since: 0.8
json_array_get_int_element
Conveniently retrieves the integer value of the element at the given position inside an array.
since: 0.8
json_array_get_null_element
Conveniently checks whether the element at the given position inside the
array contains a null value.
since: 0.8
json_array_get_object_element
Conveniently retrieves the object at the given position inside an array.
since: 0.8
json_array_get_string_element
Conveniently retrieves the string value of the element at the given position inside an array.
since: 0.8
json_array_is_immutable
Check whether the given array has been marked as immutable by calling
json_array_seal() on it.
since: 1.2