json2uglystr()

json2uglystr()#

json2uglystr converts a JSON object into a compact, non-tabular string representation.

Prototype

char *json2uglystr(const json_t *jn);

Parameters

Key

Type

Description

jn

const json_t *

A pointer to the JSON object to be converted.


Return Value

A dynamically allocated string containing the compact JSON representation. The caller must free the returned string using gbmem_free().

Notes

This function uses JSON_COMPACT and JSON_ENCODE_ANY flags to generate a minimal JSON string without indentation.

Prototype

// Not applicable in JS

Prototype

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