Array


Object Hierarchy:

Object hierarchy for Array

Description:

[ CCode ( ref_function = "json_array_ref" , type_id = "json_array_get_type ()" , unref_function = "json_array_unref" ) ]
[ Compact ]
public class Array

`JsonArray` is the representation of the array type inside JSON.

A `JsonArray` contains [struct@Json.Node] 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 [method@Json.Array.ref] and [method@Json.Array.unref].

To append an element, use [method@Json.Array.add_element].

To extract an element at a given index, use [method@Json.Array.get_element].

To retrieve the entire array in list form, use [method@Json.Array.get_elements].

To retrieve the length of the array, use [method@Json.Array.get_length].


Namespace: Json
Package: json-glib-1.0

Content:

Creation methods:

Methods: