17 #  define JSON_INLINE inline    19 #  define JSON_INLINE inline    26 #ifndef JSON_INTEGER_IS_LONG_LONG    27 #define JSON_INTEGER_IS_LONG_LONG 1    32 #ifndef JSON_HAVE_LOCALECONV    33 #define JSON_HAVE_LOCALECONV 1    42 #define JANSSON_MAJOR_VERSION  2    43 #define JANSSON_MINOR_VERSION  7    44 #define JANSSON_MICRO_VERSION  0    47 #define JANSSON_VERSION  "2.7"    51 #define JANSSON_VERSION_HEX  ((JANSSON_MAJOR_VERSION << 16) |   \    52                               (JANSSON_MINOR_VERSION << 8)  |   \    53                               (JANSSON_MICRO_VERSION << 0))    74 #ifndef JANSSON_USING_CMAKE     75 #if JSON_INTEGER_IS_LONG_LONG    76 #define JSON_INTEGER_FORMAT "lld"    79 #define JSON_INTEGER_FORMAT "ld"    84 #define json_typeof(json)      ((json)->type)    85 #define json_is_object(json)   ((json) && json_typeof(json) == JSON_OBJECT)    86 #define json_is_array(json)    ((json) && json_typeof(json) == JSON_ARRAY)    87 #define json_is_string(json)   ((json) && json_typeof(json) == JSON_STRING)    88 #define json_is_integer(json)  ((json) && json_typeof(json) == JSON_INTEGER)    89 #define json_is_real(json)     ((json) && json_typeof(json) == JSON_REAL)    90 #define json_is_number(json)   (json_is_integer(json) || json_is_real(json))    91 #define json_is_true(json)     ((json) && json_typeof(json) == JSON_TRUE)    92 #define json_is_false(json)    ((json) && json_typeof(json) == JSON_FALSE)    93 #define json_boolean_value     json_is_true    94 #define json_is_boolean(json)  (json_is_true(json) || json_is_false(json))    95 #define json_is_null(json)     ((json) && json_typeof(json) == JSON_NULL)   109 #define json_boolean(val)      ((val) ? json_true() : json_false())   115     if(json && json->
refcount != (
size_t)-1)
   124 void json_decref(
json_t *json)
   133 #define JSON_ERROR_TEXT_LENGTH    160   134 #define JSON_ERROR_SOURCE_LENGTH   80   165 #define json_object_foreach(object, key, value) \   166     for(key = json_object_iter_key(json_object_iter(object)); \   167         key && (value = json_object_iter_value(json_object_key_to_iter(key))); \   168         key = json_object_iter_key(json_object_iter_next(object, json_object_key_to_iter(key))))   170 #define json_array_foreach(array, index, value) \   172                 index < json_array_size(array) && (value = json_array_get(array, index)); \   176 int json_object_set(
json_t *
object, 
const char *key, 
json_t *value)
   182 int json_object_set_nocheck(
json_t *
object, 
const char *key, 
json_t *value)
   188 int json_object_iter_set(
json_t *
object, 
void *iter, 
json_t *value)
   203 int json_array_set(
json_t *array, 
size_t ind, 
json_t *value)
   215 int json_array_insert(
json_t *array, 
size_t ind, 
json_t *value)
   239 #define JSON_VALIDATE_ONLY  0x1   240 #define JSON_STRICT         0x2   260 #define JSON_REJECT_DUPLICATES  0x1   261 #define JSON_DISABLE_EOF_CHECK  0x2   262 #define JSON_DECODE_ANY         0x4   263 #define JSON_DECODE_INT_AS_REAL 0x8   264 #define JSON_ALLOW_NUL          0x10   277 #define JSON_MAX_INDENT         0x1F   278 #define JSON_INDENT(n)          ((n) & JSON_MAX_INDENT)   279 #define JSON_COMPACT            0x20   280 #define JSON_ENSURE_ASCII       0x40   281 #define JSON_SORT_KEYS          0x80   282 #define JSON_PRESERVE_ORDER     0x100   283 #define JSON_ENCODE_ANY         0x200   284 #define JSON_ESCAPE_SLASH       0x400   285 #define JSON_REAL_PRECISION(n)  (((n) & 0x1F) << 11)   296 typedef void *(*json_malloc_t)(size_t);
 
json_t * json_pack(const char *fmt,...)
size_t json_string_length(const json_t *string)
void * json_object_iter_at(json_t *object, const char *key)
json_t * json_object(void)
void * json_object_iter(json_t *object)
char * json_dumps(const json_t *json, size_t flags)
void * json_object_key_to_iter(const char *key)
json_t * json_string(const char *value)
json_t * json_pack_ex(json_error_t *error, size_t flags, const char *fmt,...)
json_t * json_stringn_nocheck(const char *value, size_t len)
#define JSON_ERROR_SOURCE_LENGTH
json_t * json_real(double value)
json_t * json_false(void)
size_t json_object_size(const json_t *object)
double json_number_value(const json_t *json)
int(* json_dump_callback_t)(const char *buffer, size_t size, void *data)
json_t * json_integer(json_int_t value)
size_t(* json_load_callback_t)(void *buffer, size_t buflen, void *data)
int json_array_extend(json_t *array, json_t *other)
double json_real_value(const json_t *real)
int json_object_clear(json_t *object)
int json_real_set(json_t *real, double value)
int json_string_set_nocheck(json_t *string, const char *value)
json_t * json_object_get(const json_t *object, const char *key)
void(* json_free_t)(void *)
int json_string_setn(json_t *string, const char *value, size_t len)
json_t * json_loadb(const char *buffer, size_t buflen, size_t flags, json_error_t *error)
void json_object_seed(size_t seed)
int json_object_iter_set_new(json_t *object, void *iter, json_t *value)
int json_unpack(json_t *root, const char *fmt,...)
int json_object_del(json_t *object, const char *key)
int json_array_set_new(json_t *array, size_t index, json_t *value)
json_t * json_copy(json_t *value)
size_t json_array_size(const json_t *array)
json_t * json_string_nocheck(const char *value)
int json_string_set(json_t *string, const char *value)
json_t * json_loads(const char *input, size_t flags, json_error_t *error)
int json_equal(json_t *value1, json_t *value2)
int json_object_update_missing(json_t *object, json_t *other)
json_t * json_stringn(const char *value, size_t len)
int json_dump_file(const json_t *json, const char *path, size_t flags)
int json_integer_set(json_t *integer, json_int_t value)
void *(* json_malloc_t)(size_t)
int json_object_set_new_nocheck(json_t *object, const char *key, json_t *value)
const char * json_object_iter_key(void *iter)
json_t * json_loadf(FILE *input, size_t flags, json_error_t *error)
int json_dump_callback(const json_t *json, json_dump_callback_t callback, void *data, size_t flags)
json_t * json_object_iter_value(void *iter)
int json_array_clear(json_t *array)
const char * json_string_value(const json_t *string)
json_t * json_vpack_ex(json_error_t *error, size_t flags, const char *fmt, va_list ap)
void json_set_alloc_funcs(json_malloc_t malloc_fn, json_free_t free_fn)
int json_object_set_new(json_t *object, const char *key, json_t *value)
json_int_t json_integer_value(const json_t *integer)
int json_unpack_ex(json_t *root, json_error_t *error, size_t flags, const char *fmt,...)
int json_object_update(json_t *object, json_t *other)
void * json_object_iter_next(json_t *object, void *iter)
int json_dumpf(const json_t *json, FILE *output, size_t flags)
void json_delete(json_t *json)
json_t * json_load_file(const char *path, size_t flags, json_error_t *error)
#define JSON_ERROR_TEXT_LENGTH
json_t * json_array_get(const json_t *array, size_t index)
int json_object_update_existing(json_t *object, json_t *other)
int json_string_setn_nocheck(json_t *string, const char *value, size_t len)
int json_array_remove(json_t *array, size_t index)
json_t * json_deep_copy(const json_t *value)
int json_array_append_new(json_t *array, json_t *value)
json_t * json_load_callback(json_load_callback_t callback, void *data, size_t flags, json_error_t *error)
int json_array_insert_new(json_t *array, size_t index, json_t *value)
int json_vunpack_ex(json_t *root, json_error_t *error, size_t flags, const char *fmt, va_list ap)
json_t * json_array(void)