Fwupd.JsonNode

Fields

None

Methods

class

kind_to_string (val)

get_kind ()

to_string (flags)

unref ()

Details

class Fwupd.JsonNode

A JSON node.

Nodes are lazy-parsed, and can either be an “object”, an “array”, a “string” or “raw” – the latter which can be parsed as a float, integer, or boolean.

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

classmethod kind_to_string(val)[source]
Parameters:

val (Fwupd.JsonNodeKind) – value, e.g. Fwupd.JsonNodeKind.RAW

Returns:

identifier string

Return type:

str

Converts an enumerated value to a string.

New in version 2.1.1.

get_kind()[source]
Returns:

a Fwupd.JsonNodeKind

Return type:

Fwupd.JsonNodeKind

Gets the kind of the JSON json_node.

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 json_node to a string representation.

New in version 2.1.1.

unref()[source]
Returns:

a Fwupd.JsonArray, or None

Return type:

Fwupd.JsonNode

Destroys a JSON json_node.

New in version 2.1.1.