GLib.Variant.get_data_as_bytes

### Method

# GLib Variantget_data_as_bytes

since: 2.36

#### Declaration [src]

    GBytes*
    g_variant_get_data_as_bytes (
      GVariant* value
    )

#### Description [src]

Returns a pointer to the serialized form of a `GVariant` instance. The semantics of this function are exactly the same as g_variant_get_data(), except that the returned `GBytes` holds a reference to the variant data.

Available since: 2.36

#### Return value

Type: `GBytes`

A new `GBytes` representing the variant data.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.