12 #ifndef _json_object_h_ 13 #define _json_object_h_ 15 #define JSON_OBJECT_DEF_HASH_ENTIRES 16 18 #define FALSE ((boolean)0) 21 #define TRUE ((boolean)1) 148 #if defined(__GNUC__) && !defined(__STRICT_ANSI__) 149 # define json_object_object_foreach(obj,key,val) \ 150 char *key; struct json_object *val; \ 151 for(struct lh_entry *entry = json_object_get_object(obj)->head; ({ if(entry) { key = (char*)entry->k; val = (struct json_object*)entry->v; } ; entry; }); entry = entry->next ) 155 # define json_object_object_foreach(obj,key,val) \ 156 char *key; struct json_object *val; struct lh_entry *entry; \ 157 for(entry = json_object_get_object(obj)->head; (entry ? (key = (char*)entry->k, val = (struct json_object*)entry->v, entry) : 0); entry = entry->next) 165 #define json_object_object_foreachC(obj,iter) \ 166 for(iter.entry = json_object_get_object(obj)->head; (iter.entry ? (iter.key = (char*)iter.entry->k, iter.val = (struct json_object*)iter.entry->v, iter.entry) : 0); iter.entry = iter.entry->next)
const char * json_number_chars
struct json_object * json_object_new_array(void)
struct array_list * json_object_get_array(struct json_object *obj)
void json_object_put(struct json_object *obj)
void json_object_object_del(struct json_object *obj, const char *key)
void json_object_object_add(struct json_object *obj, const char *key, struct json_object *val)
struct json_object * json_object_new_object(void)
struct json_object * json_object_array_get_idx(struct json_object *obj, int idx)
double json_object_get_double(struct json_object *obj)
struct json_object * json_object_new_int(int i)
int json_object_get_int(struct json_object *obj)
enum json_type json_object_get_type(struct json_object *obj)
struct json_object * json_object_new_string(const char *s)
void json_set_float_format(const char *f)
char * json_object_get_string(struct json_object *obj)
struct lh_table * json_object_get_object(struct json_object *obj)
int json_object_array_length(struct json_object *obj)
int json_object_is_type(struct json_object *obj, int type)
const char * json_object_to_json_string(struct json_object *obj)
struct json_object * json_object_new_string_len(const char *s, int len)
struct json_object * json_object_get(struct json_object *obj)
int json_object_array_add(struct json_object *obj, struct json_object *val)
struct json_object * json_object_new_double(double d)
struct json_object * json_object_object_get(struct json_object *obj, const char *key)
boolean json_object_get_boolean(struct json_object *obj)
struct json_object * json_object_new_boolean(boolean b)
const char * json_hex_chars
int json_object_array_put_idx(struct json_object *obj, int idx, struct json_object *val)