Json.gvariant_serialize_data
Description: Reference for Json.gvariant_serialize_data

### Function

# Jsongvariant_serialize_data

#### Declaration [src]

    gchar*
    json_gvariant_serialize_data (
      GVariant* variant,
      gsize* length
    )

#### Description [src]

Converts `variant` to its JSON encoded string representation.

This is a convenience function around `json_gvariant_serialize()`, to obtain the JSON tree, and then `JsonGenerator` to stringify it.

Available since: | 0.14

#### Parameters

`variant` | `GVariant`
| A `GVariant` to convert.
| The data is owned by the caller of the function.
`length` | `gsize*`
| The length of the returned string.
| The argument will be set by the function.
| The argument can be `NULL`.

#### Return value

Returns: | `gchar*`
| The JSON encoded string corresponding to the given variant.
| The caller of the function takes ownership of the data, and is responsible for freeing it.
| The value is a NUL terminated UTF-8 string.