1 #ifndef ACL_JSON_INCLUDE_H 2 #define ACL_JSON_INCLUDE_H 8 #include "../stdlib/acl_define.h" 9 #include "../stdlib/acl_dbuf_pool.h" 10 #include "../stdlib/acl_iterator.h" 11 #include "../stdlib/acl_vstring.h" 12 #include "../stdlib/acl_ring.h" 13 #include "../stdlib/acl_array.h" 25 #define ACL_JSON_T_A_STRING (1 << 0) 26 #define ACL_JSON_T_A_NUMBER (1 << 1) 27 #define ACL_JSON_T_A_BOOL (1 << 2) 28 #define ACL_JSON_T_A_NULL (1 << 3) 29 #define ACL_JSON_T_A_DOUBLE (1 << 4) 31 #define ACL_JSON_T_STRING (1 << 5) 32 #define ACL_JSON_T_NUMBER (1 << 6) 33 #define ACL_JSON_T_BOOL (1 << 7) 34 #define ACL_JSON_T_NULL (1 << 8) 35 #define ACL_JSON_T_DOUBLE (1 << 9) 37 #define ACL_JSON_T_ARRAY (1 << 10) 38 #define ACL_JSON_T_OBJ (1 << 11) 39 #define ACL_JSON_T_LEAF (1 << 12) 40 #define ACL_JSON_T_MEMBER (1 << 13) 41 #define ACL_JSON_T_PAIR (1 << 14) 42 #define ACL_JSON_T_ELEMENT (1 << 15) 88 #define ACL_JSON_FLAG_PART_WORD (1 << 0) 89 #define ACL_JSON_FLAG_ADD_SPACE (1 << 1) 304 const char *
name,
const char *value);
305 #define acl_json_create_leaf acl_json_create_text 316 const char *
name,
int value);
336 const char *
name, acl_int64 value);
347 const char *
name,
double value);
ACL_API ACL_JSON_NODE * acl_json_create_array_text(ACL_JSON *json, const char *text)
ACL_API int acl_json_node_delete(ACL_JSON_NODE *node)
ACL_API ACL_JSON_NODE * acl_json_create_array_null(ACL_JSON *json)
HTTP_API void const char * name
ACL_API ACL_JSON_NODE * acl_json_node_duplicate(ACL_JSON *json, ACL_JSON_NODE *from)
ACL_API ACL_JSON_NODE * acl_json_node_next(ACL_JSON_NODE *node)
ACL_API void acl_json_building(ACL_JSON *json, size_t length, int(*callback)(ACL_JSON *, ACL_VSTRING *, void *), void *ctx)
ACL_JSON_NODE * curr_node
ACL_API ACL_JSON_NODE * acl_json_create_int64(ACL_JSON *json, const char *name, acl_int64 value)
ACL_API ACL_JSON * acl_json_dbuf_alloc(ACL_DBUF_POOL *dbuf)
ACL_API ACL_VSTRING * acl_json_build(ACL_JSON *json, ACL_VSTRING *buf)
ACL_API ACL_JSON * acl_json_create(ACL_JSON_NODE *node)
ACL_API ACL_JSON_NODE * acl_json_create_obj(ACL_JSON *json)
ACL_API void acl_json_foreach_init(ACL_JSON *json, ACL_JSON_NODE *node)
ACL_API int acl_json_finish(ACL_JSON *json)
ACL_API ACL_JSON * acl_json_alloc(void)
ACL_API void acl_json_node_add_child(ACL_JSON_NODE *parent, ACL_JSON_NODE *child)
ACL_API const char * acl_json_update(ACL_JSON *json, const char *data)
ACL_API ACL_JSON_NODE * acl_json_create_bool(ACL_JSON *json, const char *name, int value)
ACL_API ACL_JSON_NODE * acl_json_getFirstElementByTagName(ACL_JSON *json, const char *tag)
ACL_API ACL_JSON_NODE * acl_json_create_null(ACL_JSON *json, const char *name)
ACL_API ACL_JSON_NODE * acl_json_node_prev(ACL_JSON_NODE *node)
struct ACL_DBUF_POOL ACL_DBUF_POOL
ACL_API ACL_JSON_NODE * acl_json_create_array(ACL_JSON *json)
ACL_API ACL_ARRAY * acl_json_getElementsByTagName(ACL_JSON *json, const char *tag)
ACL_API void acl_json_node_append(ACL_JSON_NODE *node1, ACL_JSON_NODE *node2)
ACL_API void acl_json_free_array(ACL_ARRAY *a)
ACL_API ACL_JSON_NODE * acl_json_node_alloc(ACL_JSON *json)
ACL_API void acl_json_node_append_child(ACL_JSON_NODE *parent, ACL_JSON_NODE *child)
ACL_API ACL_JSON_NODE * acl_json_create_array_double(ACL_JSON *json, double value)
ACL_API ACL_ARRAY * acl_json_getElementsByTags(ACL_JSON *json, const char *tags)
ACL_API void acl_json_free(ACL_JSON *json)
ACL_API ACL_JSON_NODE * acl_json_create_text(ACL_JSON *json, const char *name, const char *value)
ACL_API ACL_JSON_NODE * acl_json_node_parent(ACL_JSON_NODE *node)
ACL_API ACL_VSTRING * acl_json_node_build(ACL_JSON_NODE *node, ACL_VSTRING *buf)
ACL_API ACL_JSON * acl_json_dbuf_create(ACL_DBUF_POOL *dbuf, ACL_JSON_NODE *node)
ACL_DBUF_POOL * dbuf_inner
ACL_API ACL_JSON_NODE * acl_json_create_double(ACL_JSON *json, const char *name, double value)
ACL_API void acl_json_reset(ACL_JSON *json)
ACL_API ACL_JSON_NODE * acl_json_create_array_bool(ACL_JSON *json, int value)
ACL_API ACL_JSON_NODE * acl_json_create_array_int64(ACL_JSON *json, acl_int64 value)
ACL_API ACL_JSON_NODE * acl_json_create_node(ACL_JSON *json, const char *name, ACL_JSON_NODE *value)