gvariantDeserialize

Converts a JSON data structure to a glib.variant.VariantG.

If signature is not NULL, it will be used to resolve ambiguous data types.

If no error occurs, the resulting glib.variant.VariantG is guaranteed to conform to signature.

If signature is not NULL but does not represent a valid glib.variant.VariantG type string, NULL is returned and the error is set to gio.types.IOErrorEnum.InvalidArgument.

If a signature is provided but the JSON structure cannot be mapped to it, NULL is returned and the error is set to gio.types.IOErrorEnum.InvalidData.

If signature is NULL, the conversion is done based strictly on the types in the JSON nodes.

The returned variant has a floating reference that will need to be sunk by the caller code.

gvariantDeserialize

Parameters

jsonNode json.node.Node

the node to convert

signature string

a valid glib.variant.VariantG type string

Return Value

Type: glib.variant.VariantG

A newly created glib.variant.VariantG