gvariantDeserializeData

Converts a JSON string to a glib.variant.Variant value.

This function works exactly like funcJson.gvariant_deserialize, but takes a JSON encoded string instead.

The string is first converted to a json.node.Node using json.parser.Parser, and then json.global.gvariantDeserialize is called on the node.

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

gvariantDeserializeData
(
string json
,
string signature = null
)

Parameters

json string

A JSON data string

signature string

A valid glib.variant.Variant type string

Return Value

Type: glib.variant.Variant

A newly created glib.variant.VariantD compliant

Throws