Fwupd.JsonArray

Fields

None

Methods

add_array (json_arr)

add_bytes (value)

add_node (json_node)

add_object (json_obj)

add_raw (value)

add_string (value)

get_size ()

to_string (flags)

Details

class Fwupd.JsonArray

A JSON array.

See also: ‘struct@FwupdJsonObject [struct@FwupdJsonNode]’

add_array(json_arr)[source]
Parameters:

json_arr (Fwupd.JsonArray) – a Fwupd.JsonArray

Adds a different array to a JSON array.

New in version 2.1.1.

add_bytes(value)[source]
Parameters:

value (GLib.Bytes) – string value

Adds bytes to a JSON array. They will be base64 encoded as a string.

New in version 2.1.1.

add_node(json_node)[source]
Parameters:

json_node (Fwupd.JsonNode) – string value

Adds a node to a JSON array.

New in version 2.1.1.

add_object(json_obj)[source]
Parameters:

json_obj (Fwupd.JsonObject) – a Fwupd.JsonObject

Adds an object to a JSON array.

New in version 2.1.1.

add_raw(value)[source]
Parameters:

value (str) – string value

Adds a raw value to a JSON array.

New in version 2.1.1.

add_string(value)[source]
Parameters:

value (str) – string value

Adds a string to a JSON array.

New in version 2.1.1.

get_size()[source]
Returns:

number of elements added

Return type:

int

Gets the size of the JSON array.

New in version 2.1.1.

to_string(flags)[source]
Parameters:

flags (Fwupd.JsonExportFlags) – some Fwupd.JsonExportFlags e.g. Fwupd.JsonExportFlags.INDENT

Returns:

a GLib.String

Return type:

GLib.String

Converts the JSON array to a string representation.

New in version 2.1.1.