Json.Generator.set_root

### Method

# Json Generatorset_root

#### Declaration [src]

    void
    json_generator_set_root (
      JsonGenerator* generator,
      JsonNode* node
    )

#### Description [src]

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

The passed `node` is copied by the generator object, so it can be safely freed after calling this function.

Sets property | `Json.Generator:root`

#### Parameters

`node`

  Type: `JsonNode`

  The root node.

  The data is owned by the caller of the method.