gvariantDeserializeData
fn
glib.variant.Variant gvariantDeserializeData(string json, string signature = null)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.
Parameters
json | A JSON data string |
signature | A valid glib.variant.Variant type string |
Returns
A newly created glib.variant.VariantD compliant