kw_serialize()

kw_serialize()#

kw_serialize() serializes specific fields in a JSON object by replacing binary fields with their serialized JSON representations.

Prototype

json_t *kw_serialize(
    hgobj     gobj,
    json_t   *kw
);

Parameters

Key

Type

Description

gobj

hgobj

A handle to the gobj instance, used for logging and context.

kw

json_t *

A JSON object containing fields to be serialized.


Return Value

Returns the same JSON object with specified binary fields replaced by their serialized JSON representations.

Notes

This function iterates over predefined binary fields and applies their corresponding serialization functions. If a field is not found or serialization fails, an error is logged.

Prototype

// Not applicable in JS

Prototype

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