### Method

# GLib Variant print

since: 2.24

#### Declaration

    gchar*
    g_variant_print (
      GVariant* value,
      gboolean type_annotate
    )

#### Description

Pretty-prints `value` in the format understood by g_variant_parse().

The format is described [here][gvariant-text].

If `type_annotate` is `TRUE`, then type information is included in the output.

Available since: 2.24

#### Parameters

`type_annotate`

  Type: `gboolean`

  `TRUE` if type information should be included in the output.

#### Return value

Type: `gchar*`

A newly-allocated string holding the result.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.