json-c  0.15
Data Structures | Macros | Typedefs | Functions
arraylist.h File Reference

Internal methods for working with json_type_array objects. Although this is exposed by the json_object_get_array() method, it is not recommended for direct use. More...

Data Structures

struct  array_list
 

Macros

#define ARRAY_LIST_DEFAULT_SIZE   32
 

Typedefs

typedef void() array_list_free_fn(void *data)
 
typedef struct array_list array_list
 

Functions

struct array_listarray_list_new (array_list_free_fn *free_fn)
 
struct array_listarray_list_new2 (array_list_free_fn *free_fn, int initial_size)
 
void array_list_free (struct array_list *al)
 
void * array_list_get_idx (struct array_list *al, size_t i)
 
int array_list_put_idx (struct array_list *al, size_t i, void *data)
 
int array_list_add (struct array_list *al, void *data)
 
size_t array_list_length (struct array_list *al)
 
void array_list_sort (struct array_list *arr, int(*compar)(const void *, const void *))
 
void * array_list_bsearch (const void **key, struct array_list *arr, int(*compar)(const void *, const void *))
 
int array_list_del_idx (struct array_list *arr, size_t idx, size_t count)
 
int array_list_shrink (struct array_list *arr, size_t empty_slots)
 

Detailed Description

Internal methods for working with json_type_array objects. Although this is exposed by the json_object_get_array() method, it is not recommended for direct use.

Macro Definition Documentation

◆ ARRAY_LIST_DEFAULT_SIZE

#define ARRAY_LIST_DEFAULT_SIZE   32

Typedef Documentation

◆ array_list

typedef struct array_list array_list

◆ array_list_free_fn

typedef void() array_list_free_fn(void *data)

Function Documentation

◆ array_list_add()

int array_list_add ( struct array_list al,
void *  data 
)

◆ array_list_bsearch()

void* array_list_bsearch ( const void **  key,
struct array_list arr,
int(*)(const void *, const void *)  compar 
)

◆ array_list_del_idx()

int array_list_del_idx ( struct array_list arr,
size_t  idx,
size_t  count 
)

◆ array_list_free()

void array_list_free ( struct array_list al)

◆ array_list_get_idx()

void* array_list_get_idx ( struct array_list al,
size_t  i 
)

◆ array_list_length()

size_t array_list_length ( struct array_list al)

◆ array_list_new()

struct array_list* array_list_new ( array_list_free_fn free_fn)

Allocate an array_list of the default size (32).

Deprecated:
Use array_list_new2() instead.

◆ array_list_new2()

struct array_list* array_list_new2 ( array_list_free_fn free_fn,
int  initial_size 
)

Allocate an array_list of the desired size.

If possible, the size should be chosen to closely match the actual number of elements expected to be used. If the exact size is unknown, there are tradeoffs to be made:

  • too small - the array_list code will need to call realloc() more often (which might incur an additional memory copy).
  • too large - will waste memory, but that can be mitigated by calling array_list_shrink() once the final size is known.
See also
array_list_shrink

◆ array_list_put_idx()

int array_list_put_idx ( struct array_list al,
size_t  i,
void *  data 
)

◆ array_list_shrink()

int array_list_shrink ( struct array_list arr,
size_t  empty_slots 
)

Shrink the array list to just enough to fit the number of elements in it, plus empty_slots.

◆ array_list_sort()

void array_list_sort ( struct array_list arr,
int(*)(const void *, const void *)  compar 
)
array_list::free_fn
array_list_free_fn * free_fn
Definition: arraylist.h:36
array_list_sort
void array_list_sort(struct array_list *arr, int(*compar)(const void *, const void *))
json_object_set_userdata
JSON_EXPORT void json_object_set_userdata(json_object *jso, void *userdata, json_object_delete_fn *user_delete)
json_type_object
@ json_type_object
Definition: json_types.h:69
json_tokener_success
@ json_tokener_success
Definition: json_tokener.h:28
JSON_C_CONST_FUNCTION
#define JSON_C_CONST_FUNCTION(func)
Definition: json_object.h:23
json_pointer_set
JSON_EXPORT int json_pointer_set(struct json_object **obj, const char *path, struct json_object *value)
json_object_new_object
JSON_EXPORT struct json_object * json_object_new_object(void)
json_tokener_get_error
JSON_EXPORT enum json_tokener_error json_tokener_get_error(struct json_tokener *tok)
json_object_iterator.h
An API for iterating over json_type_object objects, styled to be familiar to C++ programmers....
lh_hash_fn
unsigned long() lh_hash_fn(const void *k)
Definition: linkhash.h:76
printbuf_memset
JSON_EXPORT int printbuf_memset(struct printbuf *pb, int offset, int charvalue, int len)
json_tokener_state_comment_start
@ json_tokener_state_comment_start
Definition: json_tokener.h:55
printbuf_new
JSON_EXPORT struct printbuf * printbuf_new(void)
json_tokener_parse
JSON_EXPORT struct json_object * json_tokener_parse(const char *str)
json_object_deep_copy
JSON_EXPORT int json_object_deep_copy(struct json_object *src, struct json_object **dst, json_c_shallow_copy_fn *shallow_copy)
json_object_get_array
JSON_EXPORT struct array_list * json_object_get_array(const struct json_object *obj)
json_tokener_new_ex
JSON_EXPORT struct json_tokener * json_tokener_new_ex(int depth)
json_object_object_get_ex
JSON_EXPORT json_bool json_object_object_get_ex(const struct json_object *obj, const char *key, struct json_object **value)
lh_table_lookup_ex
json_bool lh_table_lookup_ex(struct lh_table *t, const void *k, void **v)
json_pointer_setf
JSON_EXPORT int json_pointer_setf(struct json_object **obj, struct json_object *value, const char *path_fmt,...)
lh_table_delete_entry
int lh_table_delete_entry(struct lh_table *t, struct lh_entry *e)
json_tokener_state_eatws
@ json_tokener_state_eatws
Definition: json_tokener.h:51
lh_table
Definition: linkhash.h:113
json_parse_uint64
JSON_EXPORT int json_parse_uint64(const char *buf, uint64_t *retval)
json_tokener_state_object_field
@ json_tokener_state_object_field
Definition: json_tokener.h:70
json_object_delete_fn
void() json_object_delete_fn(struct json_object *jso, void *userdata)
Definition: json_types.h:52
json_inttypes.h
Do not use, json-c internal, may be changed or removed at any time.
lh_table::tail
struct lh_entry * tail
Definition: linkhash.h:132
json_object_new_null
JSON_EXPORT struct json_object * json_object_new_null(void)
json_tokener_state_string_escape
@ json_tokener_state_string_escape
Definition: json_tokener.h:60
json_type_int
@ json_type_int
Definition: json_types.h:68
json_object_get_userdata
JSON_EXPORT void * json_object_get_userdata(json_object *jso)
lh_table::size
int size
Definition: linkhash.h:118
json_tokener::char_offset
int char_offset
Definition: json_tokener.h:111
json_object_free_userdata
JSON_EXPORT json_object_delete_fn json_object_free_userdata
Definition: json_object.h:312
json_c_visit_userfunc
int() json_c_visit_userfunc(json_object *jso, int flags, json_object *parent_jso, const char *jso_key, size_t *jso_index, void *userarg)
Definition: json_visit.h:15
json_object_get_string
const JSON_EXPORT char * json_object_get_string(struct json_object *obj)
lh_table::count
int count
Definition: linkhash.h:122
json_tokener_continue
@ json_tokener_continue
Definition: json_tokener.h:29
json_tokener_reset
JSON_EXPORT void json_tokener_reset(struct json_tokener *tok)
json_pointer.h
JSON Pointer (RFC 6901) implementation for retrieving objects from a json-c object tree.
json_c_shallow_copy_fn
int() json_c_shallow_copy_fn(json_object *src, json_object *parent, const char *key, size_t index, json_object **dst)
Definition: json_object.h:1026
json_object_new_array_ext
JSON_EXPORT struct json_object * json_object_new_array_ext(int initial_size)
json_object_get_object
JSON_EXPORT struct lh_table * json_object_get_object(const struct json_object *obj)
printbuf_reset
JSON_EXPORT void printbuf_reset(struct printbuf *p)
printbuf
Definition: printbuf.h:38
array_list_get_idx
void * array_list_get_idx(struct array_list *al, size_t i)
json_object
struct json_object json_object
The core type for all type of JSON objects handled by json-c.
Definition: json_types.h:47
json_tokener_error_parse_object_key_sep
@ json_tokener_error_parse_object_key_sep
Definition: json_tokener.h:38
json_tokener_state_array_add
@ json_tokener_state_array_add
Definition: json_tokener.h:67
lh_table::table
struct lh_entry * table
Definition: linkhash.h:134
json_object_array_del_idx
JSON_EXPORT int json_object_array_del_idx(struct json_object *obj, size_t idx, size_t count)
json_tokener_state_array_after_sep
@ json_tokener_state_array_after_sep
Definition: json_tokener.h:75
json_tokener_state_comment
@ json_tokener_state_comment
Definition: json_tokener.h:56
json_object_iter
Definition: json_types.h:34
json_tokener
Definition: json_tokener.h:100
json_tokener_error_parse_array
@ json_tokener_error_parse_array
Definition: json_tokener.h:36
json_object_get_type
JSON_EXPORT enum json_type json_object_get_type(const struct json_object *obj)
json_tokener::pb
struct printbuf * pb
Definition: json_tokener.h:106
json_object_double_to_json_string
JSON_EXPORT int json_object_double_to_json_string(struct json_object *jso, struct printbuf *pb, int level, int flags)
json_object_new_string
JSON_EXPORT struct json_object * json_object_new_string(const char *s)
json_object_set_serializer
JSON_EXPORT void json_object_set_serializer(json_object *jso, json_object_to_json_string_fn *to_string_func, void *userdata, json_object_delete_fn *user_delete)
json_tokener::depth
int depth
Definition: json_tokener.h:107
array_list_new2
struct array_list * array_list_new2(array_list_free_fn *free_fn, int initial_size)
printbuf.h
Internal string buffer handing. Unless you're writing a json_object_to_json_string_fn implementation ...
json_object_iter_next
JSON_EXPORT void json_object_iter_next(struct json_object_iterator *iter)
json_object_int_inc
JSON_EXPORT int json_object_int_inc(struct json_object *obj, int64_t val)
json_tokener_state_escape_unicode_need_escape
@ json_tokener_state_escape_unicode_need_escape
Definition: json_tokener.h:62
lh_equal_fn
int() lh_equal_fn(const void *k1, const void *k2)
Definition: linkhash.h:80
json_tokener_state_object_value
@ json_tokener_state_object_value
Definition: json_tokener.h:72
json_pointer_getf
JSON_EXPORT int json_pointer_getf(struct json_object *obj, struct json_object **res, const char *path_fmt,...)
json_tokener_srec::obj
struct json_object * obj
Definition: json_tokener.h:86
json_object_array_put_idx
JSON_EXPORT int json_object_array_put_idx(struct json_object *obj, size_t idx, struct json_object *val)
json_object_from_fd_ex
JSON_EXPORT struct json_object * json_object_from_fd_ex(int fd, int depth)
printbuf_free
JSON_EXPORT void printbuf_free(struct printbuf *p)
json_c_version.h
Methods for retrieving the json-c version.
json_object_get_string_len
JSON_EXPORT int json_object_get_string_len(const struct json_object *obj)
json_object_array_add
JSON_EXPORT int json_object_array_add(struct json_object *obj, struct json_object *val)
array_list_free_fn
void() array_list_free_fn(void *data)
Definition: arraylist.h:29
json_object_get_uint64
JSON_EXPORT uint64_t json_object_get_uint64(const struct json_object *obj)
json_object_new_int64
JSON_EXPORT struct json_object * json_object_new_int64(int64_t i)
json_object_set_int64
JSON_EXPORT int json_object_set_int64(struct json_object *obj, int64_t new_value)
json_tokener::is_double
int is_double
Definition: json_tokener.h:107
lh_table_new
struct lh_table * lh_table_new(int size, lh_entry_free_fn *free_fn, lh_hash_fn *hash_fn, lh_equal_fn *equal_fn)
json_tokener_state_comment_end
@ json_tokener_state_comment_end
Definition: json_tokener.h:58
json_tokener_state_object_sep
@ json_tokener_state_object_sep
Definition: json_tokener.h:74
json_object_get_boolean
JSON_EXPORT json_bool json_object_get_boolean(const struct json_object *obj)
json_object_object_add_ex
JSON_EXPORT int json_object_object_add_ex(struct json_object *obj, const char *const key, struct json_object *const val, const unsigned opts)
json_type_double
@ json_type_double
Definition: json_types.h:67
json_tokener::flags
int flags
Definition: json_tokener.h:119
json_c_version
const JSON_EXPORT char * json_c_version(void)
json_object_put
JSON_EXPORT int json_object_put(struct json_object *obj)
json_tokener_error_parse_unexpected
@ json_tokener_error_parse_unexpected
Definition: json_tokener.h:32
json_object_iter::entry
struct lh_entry * entry
Definition: json_types.h:38
json_tokener_error_parse_number
@ json_tokener_error_parse_number
Definition: json_tokener.h:35
json_object_iter_equal
JSON_EXPORT json_bool json_object_iter_equal(const struct json_object_iterator *iter1, const struct json_object_iterator *iter2)
json_tokener_state_object_field_end
@ json_tokener_state_object_field_end
Definition: json_tokener.h:71
json_object_object_get
JSON_EXPORT struct json_object * json_object_object_get(const struct json_object *obj, const char *key)
json_c_version_num
JSON_EXPORT int json_c_version_num(void)
json_object_iter_init_default
JSON_EXPORT struct json_object_iterator json_object_iter_init_default(void)
json_object_set_int
JSON_EXPORT int json_object_set_int(struct json_object *obj, int new_value)
json_tokener::ucs_char
unsigned int ucs_char
Definition: json_tokener.h:116
json_tokener_error_parse_string
@ json_tokener_error_parse_string
Definition: json_tokener.h:40
printbuf::size
int size
Definition: printbuf.h:42
json_type_array
@ json_type_array
Definition: json_types.h:70
json_object_iter_peek_value
JSON_EXPORT struct json_object * json_object_iter_peek_value(const struct json_object_iterator *iter)
lh_table_resize
int lh_table_resize(struct lh_table *t, int new_size)
json_object_iter_end
JSON_EXPORT struct json_object_iterator json_object_iter_end(const struct json_object *obj)
json_object_object_length
JSON_EXPORT int json_object_object_length(const struct json_object *obj)
json_object_get
JSON_EXPORT struct json_object * json_object_get(struct json_object *obj)
json_tokener_new
JSON_EXPORT struct json_tokener * json_tokener_new(void)
json_object_to_json_string_fn
int() json_object_to_json_string_fn(struct json_object *jso, struct printbuf *pb, int level, int flags)
Definition: json_types.h:57
json_object_set_string_len
JSON_EXPORT int json_object_set_string_len(json_object *obj, const char *new_value, int len)
lh_table_length
int lh_table_length(struct lh_table *t)
json_tokener::str
char * str
Definition: json_tokener.h:105
json_tokener_state_string
@ json_tokener_state_string
Definition: json_tokener.h:59
json_object_iter::val
struct json_object * val
Definition: json_types.h:37
json_tokener_srec::saved_state
enum json_tokener_state state saved_state
Definition: json_tokener.h:85
json_tokener::max_depth
int max_depth
Definition: json_tokener.h:107
lh_table::hash_fn
lh_hash_fn * hash_fn
Definition: linkhash.h:140
json_type_string
@ json_type_string
Definition: json_types.h:71
json_object_new_int
JSON_EXPORT struct json_object * json_object_new_int(int32_t i)
json_tokener::high_surrogate
unsigned int high_surrogate
Definition: json_tokener.h:116
lh_table::head
struct lh_entry * head
Definition: linkhash.h:127
json_tokener_state_escape_unicode
@ json_tokener_state_escape_unicode
Definition: json_tokener.h:61
JSON_EXPORT
#define JSON_EXPORT
Definition: printbuf.h:30
json_c_set_serialization_double_format
JSON_EXPORT int json_c_set_serialization_double_format(const char *double_format, int global_or_thread)
json_object_new_array
JSON_EXPORT struct json_object * json_object_new_array(void)
json_c_visit
JSON_EXPORT int json_c_visit(json_object *jso, int future_flags, json_c_visit_userfunc *userfunc, void *userarg)
json_object_equal
JSON_EXPORT int json_object_equal(struct json_object *obj1, struct json_object *obj2)
json_object.h
Core json-c API. Start here, or with json_tokener.h.
json_object_set_string
JSON_EXPORT int json_object_set_string(json_object *obj, const char *new_value)
json_tokener_srec
Definition: json_tokener.h:83
json_object_array_get_idx
JSON_EXPORT struct json_object * json_object_array_get_idx(const struct json_object *obj, size_t idx)
array_list_length
size_t array_list_length(struct array_list *al)
json_tokener_parse_ex
JSON_EXPORT struct json_object * json_tokener_parse_ex(struct json_tokener *tok, const char *str, int len)
json_object_array_length
JSON_EXPORT size_t json_object_array_length(const struct json_object *obj)
json_tokener_state_object_field_start
@ json_tokener_state_object_field_start
Definition: json_tokener.h:69
array_list::length
size_t length
Definition: arraylist.h:34
json_object_set_uint64
JSON_EXPORT int json_object_set_uint64(struct json_object *obj, uint64_t new_value)
json_object_iter::key
char * key
Definition: json_types.h:36
json_object_get_int64
JSON_EXPORT int64_t json_object_get_int64(const struct json_object *obj)
lh_entry::k_is_constant
int k_is_constant
Definition: linkhash.h:95
lh_kptr_table_new
struct lh_table * lh_kptr_table_new(int size, lh_entry_free_fn *free_fn)
json_tokener_error
json_tokener_error
Definition: json_tokener.h:26
json_object_to_file_ext
JSON_EXPORT int json_object_to_file_ext(const char *filename, struct json_object *obj, int flags)
json_object_iterator
Definition: json_object_iterator.h:42
json_type_boolean
@ json_type_boolean
Definition: json_types.h:66
json_tokener_error_parse_object_key_name
@ json_tokener_error_parse_object_key_name
Definition: json_tokener.h:37
json_tokener_state_boolean
@ json_tokener_state_boolean
Definition: json_tokener.h:64
json_tokener_error_size
@ json_tokener_error_size
Definition: json_tokener.h:43
json_tokener_state_finish
@ json_tokener_state_finish
Definition: json_tokener.h:53
array_list::size
size_t size
Definition: arraylist.h:35
json_tokener_state_array
@ json_tokener_state_array
Definition: json_tokener.h:66
json_object_object_add
JSON_EXPORT int json_object_object_add(struct json_object *obj, const char *key, struct json_object *val)
json_object_set_double
JSON_EXPORT int json_object_set_double(struct json_object *obj, double new_value)
json_object_get_double
JSON_EXPORT double json_object_get_double(const struct json_object *obj)
json_object_from_file
JSON_EXPORT struct json_object * json_object_from_file(const char *filename)
json_tokener_state_object_field_start_after_sep
@ json_tokener_state_object_field_start_after_sep
Definition: json_tokener.h:76
lh_table_delete
int lh_table_delete(struct lh_table *t, const void *k)
json_type_to_name
const JSON_EXPORT char * json_type_to_name(enum json_type o_type)
array_list_shrink
int array_list_shrink(struct array_list *arr, size_t empty_slots)
json_object_is_type
JSON_EXPORT int json_object_is_type(const struct json_object *obj, enum json_type type)
lh_entry::prev
struct lh_entry * prev
Definition: linkhash.h:107
json_tokener_srec::obj_field_name
char * obj_field_name
Definition: json_tokener.h:88
lh_entry::k
const void * k
Definition: linkhash.h:90
lh_table::equal_fn
lh_equal_fn * equal_fn
Definition: linkhash.h:141
lh_entry
Definition: linkhash.h:85
json_tokener::quote_char
char quote_char
Definition: json_tokener.h:117
json_c_shallow_copy_default
JSON_EXPORT json_c_shallow_copy_fn json_c_shallow_copy_default
Definition: json_object.h:1041
json_object_to_json_string_ext
const JSON_EXPORT char * json_object_to_json_string_ext(struct json_object *obj, int flags)
json_object_new_double_s
JSON_EXPORT struct json_object * json_object_new_double_s(double d, const char *ds)
json_tokener::err
enum json_tokener_error err
Definition: json_tokener.h:115
json_tokener_free
JSON_EXPORT void json_tokener_free(struct json_tokener *tok)
json_object_new_boolean
JSON_EXPORT struct json_object * json_object_new_boolean(json_bool b)
json_object_from_fd
JSON_EXPORT struct json_object * json_object_from_fd(int fd)
printbuf::bpos
int bpos
Definition: printbuf.h:41
json_tokener_state_number
@ json_tokener_state_number
Definition: json_tokener.h:65
json_tokener_error_parse_eof
@ json_tokener_error_parse_eof
Definition: json_tokener.h:31
json_tokener_state_start
@ json_tokener_state_start
Definition: json_tokener.h:52
json_tokener.h
Methods to parse an input string into a tree of json_object objects.
lh_kchar_table_new
struct lh_table * lh_kchar_table_new(int size, lh_entry_free_fn *free_fn)
json_tokener_set_flags
JSON_EXPORT void json_tokener_set_flags(struct json_tokener *tok, int flags)
json_bool
int json_bool
Definition: json_types.h:42
lh_table_lookup_entry
struct lh_entry * lh_table_lookup_entry(struct lh_table *t, const void *k)
JSON_EXPORT
#define JSON_EXPORT
Definition: json_c_version.h:30
json_object_set_boolean
JSON_EXPORT int json_object_set_boolean(struct json_object *obj, json_bool new_value)
json_object_to_json_string
const JSON_EXPORT char * json_object_to_json_string(struct json_object *obj)
json_tokener_error_parse_null
@ json_tokener_error_parse_null
Definition: json_tokener.h:33
json_type_null
@ json_type_null
Definition: json_types.h:65
json_object_new_string_len
JSON_EXPORT struct json_object * json_object_new_string_len(const char *s, const int len)
lh_table_lookup_entry_w_hash
struct lh_entry * lh_table_lookup_entry_w_hash(struct lh_table *t, const void *k, const unsigned long h)
json_tokener_state_array_sep
@ json_tokener_state_array_sep
Definition: json_tokener.h:68
printbuf::buf
char * buf
Definition: printbuf.h:40
json_object_new_uint64
JSON_EXPORT struct json_object * json_object_new_uint64(uint64_t i)
json_util_get_last_err
const JSON_EXPORT char * json_util_get_last_err(void)
array_list_free
void array_list_free(struct array_list *al)
json_tokener_state_escape_unicode_need_u
@ json_tokener_state_escape_unicode_need_u
Definition: json_tokener.h:63
lh_entry::next
struct lh_entry * next
Definition: linkhash.h:103
array_list_add
int array_list_add(struct array_list *al, void *data)
json_pointer_get
JSON_EXPORT int json_pointer_get(struct json_object *obj, const char *path, struct json_object **res)
json_tokener_error_depth
@ json_tokener_error_depth
Definition: json_tokener.h:30
json_object_array_sort
JSON_EXPORT void json_object_array_sort(struct json_object *jso, int(*sort_fn)(const void *, const void *))
json_tokener_state_comment_eol
@ json_tokener_state_comment_eol
Definition: json_tokener.h:57
json_object_iter_begin
JSON_EXPORT struct json_object_iterator json_object_iter_begin(struct json_object *obj)
json_object_to_json_string_length
const JSON_EXPORT char * json_object_to_json_string_length(struct json_object *obj, int flags, size_t *length)
json_types.h
Basic types used in a few places in json-c, but you should include "json_object.h" instead.
json_tokener_srec::current
struct json_object * current
Definition: json_tokener.h:87
array_list
Definition: arraylist.h:31
json_tokener_error_parse_comment
@ json_tokener_error_parse_comment
Definition: json_tokener.h:41
json_tokener_get_parse_end
JSON_EXPORT size_t json_tokener_get_parse_end(struct json_tokener *tok)
json_object_array_shrink
JSON_EXPORT int json_object_array_shrink(struct json_object *jso, int empty_slots)
json_object_iter_peek_name
const JSON_EXPORT char * json_object_iter_peek_name(const struct json_object_iterator *iter)
json_object_to_file
JSON_EXPORT int json_object_to_file(const char *filename, struct json_object *obj)
json_tokener_state_object_value_add
@ json_tokener_state_object_value_add
Definition: json_tokener.h:73
linkhash.h
Internal methods for working with json_type_object objects. Although this is exposed by the json_obje...
printbuf_memappend
JSON_EXPORT int printbuf_memappend(struct printbuf *p, const char *buf, int size)
json_object_to_fd
JSON_EXPORT int json_object_to_fd(int fd, struct json_object *obj, int flags)
array_list_bsearch
void * array_list_bsearch(const void **key, struct array_list *arr, int(*compar)(const void *, const void *))
array_list_new
struct array_list * array_list_new(array_list_free_fn *free_fn)
lh_entry::v
const void * v
Definition: linkhash.h:99
arraylist.h
Internal methods for working with json_type_array objects. Although this is exposed by the json_objec...
array_list::array
void ** array
Definition: arraylist.h:33
json_util.h
Miscllaneous utility functions and macros.
json_tokener_state
json_tokener_state
Definition: json_tokener.h:49
json_tokener_parse_verbose
JSON_EXPORT struct json_object * json_tokener_parse_verbose(const char *str, enum json_tokener_error *error)
sprintbuf
JSON_EXPORT int sprintbuf(struct printbuf *p, const char *msg,...)
json_type
json_type
Definition: json_types.h:62
json_tokener::stack
struct json_tokener_srec * stack
Definition: json_tokener.h:118
lh_table_free
void lh_table_free(struct lh_table *t)
array_list_del_idx
int array_list_del_idx(struct array_list *arr, size_t idx, size_t count)
json_tokener_error_parse_utf8_string
@ json_tokener_error_parse_utf8_string
Definition: json_tokener.h:42
lh_entry_free_fn
void() lh_entry_free_fn(struct lh_entry *e)
Definition: linkhash.h:72
json_global_set_string_hash
int json_global_set_string_hash(const int h)
json_object_get_int
JSON_EXPORT int32_t json_object_get_int(const struct json_object *obj)
json_tokener_error_parse_boolean
@ json_tokener_error_parse_boolean
Definition: json_tokener.h:34
array_list_put_idx
int array_list_put_idx(struct array_list *al, size_t i, void *data)
json_tokener_error_desc
const JSON_EXPORT char * json_tokener_error_desc(enum json_tokener_error jerr)
lh_table_insert_w_hash
int lh_table_insert_w_hash(struct lh_table *t, const void *k, const void *v, const unsigned long h, const unsigned opts)
json_object_iterator::opaque_
const void * opaque_
Definition: json_object_iterator.h:44
json_object_new_double
JSON_EXPORT struct json_object * json_object_new_double(double d)
json_object_object_del
JSON_EXPORT void json_object_object_del(struct json_object *obj, const char *key)
json_object_array_bsearch
JSON_EXPORT struct json_object * json_object_array_bsearch(const struct json_object *key, const struct json_object *jso, int(*sort_fn)(const void *, const void *))
json_tokener::st_pos
int st_pos
Definition: json_tokener.h:107
json_object_userdata_to_json_string
JSON_EXPORT json_object_to_json_string_fn json_object_userdata_to_json_string
Definition: json_object.h:323
json_parse_double
JSON_EXPORT int json_parse_double(const char *buf, double *retval)
json_tokener_state_null
@ json_tokener_state_null
Definition: json_tokener.h:54
json_tokener_state_inf
@ json_tokener_state_inf
Definition: json_tokener.h:77
json_parse_int64
JSON_EXPORT int json_parse_int64(const char *buf, int64_t *retval)
lh_table::free_fn
lh_entry_free_fn * free_fn
Definition: linkhash.h:139
lh_table_insert
int lh_table_insert(struct lh_table *t, const void *k, const void *v)
json_tokener_error_parse_object_value_sep
@ json_tokener_error_parse_object_value_sep
Definition: json_tokener.h:39