gobj_create_tree0()

gobj_create_tree0()#

Creates a GObj tree using a hierarchical JSON structure.
This function directly uses the provided JSON object to build a parent-child hierarchy of Gobjs.

Prototype

PUBLIC hgobj gobj_create_tree0(
    hgobj    parent,
    json_t   *jn_tree
);

Parameters

Key

Type

Description

parent

hgobj

Handle to the parent GObj under which the tree is created. If NULL, the tree is created at the root level.

jn_tree

json_t *

JSON object that defines the GObj tree structure.
This includes attributes for each GObj, its children, and configuration flags such as autostart, service, or pure_child.

Return Value

  • Returns the handle (hgobj) to the root of the created GObj tree.

  • Returns NULL if the creation fails.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples