Json.gvariant_deserialize_data
Description: Reference for Json.gvariant_deserialize_data

### Function

# Jsongvariant_deserialize_data

#### Declaration [src]

    GVariant*
    json_gvariant_deserialize_data (
      const gchar* json,
      gssize length,
      const gchar* signature,
      GError** error
    )

#### Description [src]

Converts a JSON string to a `GVariant` value.

This function works exactly like `json_gvariant_deserialize()`, but takes a JSON encoded string instead.

The string is first converted to a `JsonNode` using `JsonParser`, and then `json_gvariant_deserialize` is called on the node.

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

Available since: | 0.14

#### Parameters

`json` | `const gchar*`
| A JSON data string.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`length` | `gssize`
| The length of `json`, or -1 if `NUL`-terminated.
`signature` | `const gchar*`
| A valid `GVariant` type string.
| The argument can be `NULL`.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`error` | `GError **`
| The return location for a `GError*`, or `NULL`.

#### Return value

Returns: | `GVariant`
| A newly created `GVariant`D compliant.
| The data is owned by the called function.
| The return value can be `NULL`.