gobj2json()

gobj2json()#

Returns a JSON object containing a structured description of the given gobj, including attributes, state, and metadata.

Prototype

json_t *gobj2json(
    hgobj gobj,
    json_t *jn_filter // owned
);

Parameters

Key

Type

Description

gobj

hgobj

The GObj instance to be described.

jn_filter

json_t *

A JSON list specifying which attributes to include in the output.


Return Value

A JSON object containing the requested details of gobj. The caller owns the returned JSON object and must free it when done.

Notes

The jn_filter parameter allows selective inclusion of attributes such as fullname, state, attrs, and gobj_flags. If jn_filter is empty, all available attributes are included.

Prototype

// Not applicable in JS

Prototype

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