gvariantDeserializeData

Converts a JSON string to a glib.variant.VariantG 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
,
ptrdiff_t length
,
string signature = null
)

Parameters

json string

A JSON data string

length ptrdiff_t

The length of json, or -1 if NUL-terminated

signature string

A valid glib.variant.VariantG type string

Return Value

Type: glib.variant.VariantG

A newly created glib.variant.VariantGD compliant