15#define min_json(obj) json_object_to_json_string_ext(obj, JSON_C_TO_STRING_PLAIN)
18#define json_object_dbg_print(obj) fprintf(stderr, "json_object_dbg_print: %s\n", json_object_to_json_string_ext(obj, JSON_C_TO_STRING_PRETTY))
22#define LOG_FMT_JSON_C(fmt, ...) "json-c: " fmt ": %s" __VA_OPT__(, ) __VA_ARGS__, json_util_get_last_err()
25#define LOG_FMT_JSON_TYPE(type, actual, fmt, ...) "json: " fmt ": type: expected %s, got %s\n" __VA_OPT__(, ) __VA_ARGS__, json_type_to_name(type), json_type_to_name(actual)
json-c wrapper. Include this instead of JSON-C (compile time error mechanisms)
bool json_object_get_int_strict(json_object const *obj, int32_t *out)
Get the 32-bit integer value of a JSON object.
bool json_object_get_uint16_strict(json_object const *obj, uint16_t *out)
Get the 16-bit unsigned integer value of a JSON object.
bool json_object_get_int64_strict(json_object const *obj, int64_t *out)
Get the 64-bit integer value of a JSON object.
bool json_object_get_string_strict(json_object *obj, slice_t *out)
Get the string value of a JSON object.
slice data strucutre - Interface