Json.Generator.take_root

### Method

# Json Generatortake_root

unstable since: 1.10

#### Declaration [src]

    void
    json_generator_take_root (
      JsonGenerator* generator,
      JsonNode* node
    )

#### Description [src]

Sets the root of the JSON data stream to be serialized by the given generator.

The ownership of the passed `node` is transferred to the generator object.

Available since: 1.10

#### Parameters

`node`

  Type: `JsonNode`

  The root node.

  The argument can be `NULL`.
  The instance takes ownership of the data, and is responsible for freeing it.