Json.serialize_gobject
Description: Reference for Json.serialize_gobject

### Function

# Jsonserialize_gobject

deprecated: 0.10

#### Declaration [src]

    gchar*
    json_serialize_gobject (
      GObject* gobject,
      gsize* length
    )

#### Description [src]

Serializes a `GObject` instance into a JSON data stream.

If the object implements the `JsonSerializable` interface, it will be asked to serizalize all its properties; otherwise, the default implementation will be use to translate the compatible types into JSON native types.

Deprecated since: 0.10

Use `json_gobject_to_data()` instead.

#### Parameters

`gobject`

  Type: `GObject`

  The object to serialize.

  The data is owned by the caller of the function.

`length`

  Type: `gsize*`

  Return value for the length of the buffer.

  The argument will be set by the function.
  The argument can be `NULL`.

#### Return value

Type: `gchar*`

A JSON data stream representing the given object.

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.