gbuffer_deserialize()

gbuffer_deserialize()#

gbuffer_deserialize() reconstructs a gbuffer_t object from a JSON representation, decoding its base64-encoded data.

Prototype

gbuffer_t *gbuffer_deserialize(
    hgobj gobj,
    const json_t *jn  // not owned
);

Parameters

Key

Type

Description

gobj

hgobj

A handle to the calling object, used for logging errors.

jn

const json_t *

A JSON object containing the serialized gbuffer_t data, including label, mark, and base64-encoded content.


Return Value

A newly allocated gbuffer_t * containing the deserialized data, or NULL if an error occurs.

Notes

The function decodes the base64-encoded data from the JSON object and reconstructs the gbuffer_t. The caller is responsible for managing the returned buffer’s memory.

Prototype

// Not applicable in JS

Prototype

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