acl/lib_acl/include/json/acl_json.h

436 lines
16 KiB
C
Raw Normal View History

2014-11-19 00:25:21 +08:00
#ifndef ACL_JSON_INCLUDE_H
#define ACL_JSON_INCLUDE_H
#ifdef __cplusplus
extern "C" {
#endif
2015-06-19 16:08:17 +08:00
#include "stdlib/acl_define.h"
#include "stdlib/acl_dbuf_pool.h"
2014-11-19 00:25:21 +08:00
#include "stdlib/acl_iterator.h"
#include "stdlib/acl_vstring.h"
#include "stdlib/acl_ring.h"
#include "stdlib/acl_array.h"
typedef struct ACL_JSON ACL_JSON;
typedef struct ACL_JSON_NODE ACL_JSON_NODE;
struct ACL_JSON_NODE {
ACL_VSTRING *ltag; /**< <20><>ǩ<EFBFBD><C7A9> */
2015-10-20 21:07:23 +08:00
ACL_VSTRING *text; /**< <20><><EFBFBD>ڵ<EFBFBD>ΪҶ<CEAA>ڵ<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>ı<EFBFBD><C4B1><EFBFBD><EFBFBD>ݷǿ<DDB7> */
ACL_JSON_NODE *tag_node; /**< <20><><EFBFBD><EFBFBD>ǩֵΪ json <20>ڵ<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD> */
int type; /**< <20>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD> */
2014-11-19 00:25:21 +08:00
#define ACL_JSON_T_A_STRING (1 << 0)
#define ACL_JSON_T_A_NUMBER (1 << 1)
#define ACL_JSON_T_A_BOOL (1 << 2)
#define ACL_JSON_T_A_NULL (1 << 3)
#define ACL_JSON_T_STRING (1 << 4)
#define ACL_JSON_T_NUMBER (1 << 5)
2014-11-19 00:25:21 +08:00
#define ACL_JSON_T_BOOL (1 << 6)
#define ACL_JSON_T_NULL (1 << 7)
#define ACL_JSON_T_ARRAY (1 << 8)
#define ACL_JSON_T_OBJ (1 << 9)
#define ACL_JSON_T_TEXT (1 << 10)
2014-11-19 00:25:21 +08:00
#define ACL_JSON_T_LEAF ACL_JSON_T_TEXT
#define ACL_JSON_T_MEMBER (1 << 11)
#define ACL_JSON_T_PAIR (1 << 12)
#define ACL_JSON_T_ELEMENT (1 << 13)
2014-11-19 00:25:21 +08:00
2015-10-20 21:07:23 +08:00
ACL_JSON_NODE *parent; /**< <20><><EFBFBD>ڵ<EFBFBD> */
ACL_RING children; /**< <20>ӽڵ㼯<DAB5><E3BCAF> */
int depth; /**< <20><>ǰ<EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
2014-11-19 00:25:21 +08:00
/* private */
ACL_JSON *json; /**< json <20><><EFBFBD><EFBFBD> */
2015-10-20 21:07:23 +08:00
ACL_RING node; /**< <20><>ǰ<EFBFBD>ڵ<EFBFBD> */
2014-11-19 00:25:21 +08:00
int quote; /**< <20><> 0 <20><>ʾ ' <20><> " */
2015-10-20 21:07:23 +08:00
int left_ch; /**< <20><><EFBFBD>ڵ<EFBFBD><DAB5>ĵ<EFBFBD>һ<EFBFBD><D2BB><EFBFBD>ַ<EFBFBD>: { or [ */
int right_ch; /**< <20><><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>ַ<EFBFBD>: } or ] */
2014-11-19 00:25:21 +08:00
int backslash; /**< ת<><D7AA><EFBFBD>ַ<EFBFBD> \ */
int part_word; /**< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־λ */
2015-10-20 21:07:23 +08:00
/* public: for acl_iterator, ͨ<><CDA8> acl_foreach <20>г<EFBFBD><D0B3>ýڵ<C3BD><DAB5><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>ӽڵ<D3BD> */
2014-11-19 00:25:21 +08:00
/* ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD> */
ACL_JSON_NODE *(*iter_head)(ACL_ITER*, ACL_JSON_NODE*);
/* ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
ACL_JSON_NODE *(*iter_next)(ACL_ITER*, ACL_JSON_NODE*);
/* ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>β<EFBFBD><CEB2><EFBFBD><EFBFBD> */
ACL_JSON_NODE *(*iter_tail)(ACL_ITER*, ACL_JSON_NODE*);
/* ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
ACL_JSON_NODE *(*iter_prev)(ACL_ITER*, ACL_JSON_NODE*);
};
enum {
2015-10-20 21:07:23 +08:00
ACL_JSON_S_ROOT, /**< <20><><EFBFBD>ڵ<EFBFBD> */
2014-11-19 00:25:21 +08:00
ACL_JSON_S_OBJ, /**< <20><>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>ֵ */
ACL_JSON_S_MEMBER,
2015-10-20 21:07:23 +08:00
ACL_JSON_S_ARRAY, /**< json <20>ڵ<EFBFBD> array */
2014-11-19 00:25:21 +08:00
ACL_JSON_S_ELEMENT,
ACL_JSON_S_PAIR, /**< name:value pair */
2015-10-20 21:07:23 +08:00
ACL_JSON_S_NEXT, /**< <20><>һ<EFBFBD><D2BB><EFBFBD>ڵ<EFBFBD> */
2014-11-19 00:25:21 +08:00
ACL_JSON_S_TAG, /**< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9> */
2015-10-20 21:07:23 +08:00
ACL_JSON_S_VALUE, /**< <20>ڵ<EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
2014-11-19 00:25:21 +08:00
ACL_JSON_S_COLON, /**< ð<><C3B0> : */
ACL_JSON_S_STRING,
ACL_JSON_S_STREND
};
struct ACL_JSON {
int depth; /**< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
2015-10-20 21:07:23 +08:00
int node_cnt; /**< <20>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> root <20>ڵ<EFBFBD> */
ACL_JSON_NODE *root; /**< json <20><><EFBFBD>ڵ<EFBFBD> */
2014-11-19 00:25:21 +08:00
int finish; /**< <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
unsigned flag; /**< <20><>־λ */
#define ACL_JSON_FLAG_PART_WORD (1 << 0) /**< <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>ݰ<EFBFBD><DDB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
2015-10-20 21:07:23 +08:00
/* public: for acl_iterator, ͨ<><CDA8> acl_foreach <20><><EFBFBD><EFBFBD><EFBFBD>г<EFBFBD><D0B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӽڵ<D3BD> */
2014-11-19 00:25:21 +08:00
/* ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD> */
ACL_JSON_NODE *(*iter_head)(ACL_ITER*, ACL_JSON*);
/* ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
ACL_JSON_NODE *(*iter_next)(ACL_ITER*, ACL_JSON*);
/* ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>β<EFBFBD><CEB2><EFBFBD><EFBFBD> */
ACL_JSON_NODE *(*iter_tail)(ACL_ITER*, ACL_JSON*);
/* ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
ACL_JSON_NODE *(*iter_prev)(ACL_ITER*, ACL_JSON*);
/* private */
2015-06-19 16:08:17 +08:00
int status; /**< ״̬<D7B4><CCAC><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>״̬ */
2014-11-19 00:25:21 +08:00
2015-10-20 21:07:23 +08:00
ACL_JSON_NODE *curr_node; /**< <20><>ǰ<EFBFBD><C7B0><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD><EFBFBD><EFBFBD> json <20>ڵ<EFBFBD> */
2015-06-19 16:08:17 +08:00
ACL_DBUF_POOL *dbuf; /**< <20><EFBFBD>ڴ<EFBFBD><DAB4>ض<EFBFBD><D8B6><EFBFBD> */
ACL_DBUF_POOL *dbuf_inner; /**< <20><EFBFBD>ڴ<EFBFBD><DAB4>ض<EFBFBD><D8B6><EFBFBD> */
size_t dbuf_keep;
2014-11-19 00:25:21 +08:00
};
/*----------------------------- in acl_json.c -----------------------------*/
/**
2015-10-20 21:07:23 +08:00
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD> json <EFBFBD>ڵ<EFBFBD>
2014-11-19 00:25:21 +08:00
* @param json {ACL_JSON*} json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2015-10-20 21:07:23 +08:00
* @return {ACL_JSON_NODE*} json <EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2014-11-19 00:25:21 +08:00
*/
ACL_API ACL_JSON_NODE *acl_json_node_alloc(ACL_JSON *json);
/**
2015-10-20 21:07:23 +08:00
* <EFBFBD><EFBFBD>ij<EFBFBD><EFBFBD> json <EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD>ӽڵ<EFBFBD><EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD>ͷŸýڵ<EFBFBD><EFBFBD><EFBFBD>ӽڵ<EFBFBD>
* <EFBFBD><EFBFBD>ռ<EFBFBD>ռ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷŸ<EFBFBD> json <EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD>ռ<EFBFBD>ڴ<EFBFBD>
* @param node {ACL_JSON_NODE*} json <EFBFBD>ڵ<EFBFBD>
* @return {int} <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><EFBFBD><EFBFBD>Ľڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2014-11-19 00:25:21 +08:00
*/
ACL_API int acl_json_node_delete(ACL_JSON_NODE *node);
/**
2015-10-20 21:07:23 +08:00
* <EFBFBD><EFBFBD>ij<EFBFBD><EFBFBD> json <EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵܽڵ<EFBFBD>(<EFBFBD><EFBFBD><EFBFBD>ֵܽڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƕ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD>ڵ<EFBFBD>)
* @param node1 {ACL_JSON_NODE*} <EFBFBD>򱾽ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD>ڵ<EFBFBD>
* @param node2 {ACL_JSON_NODE*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD><EFBFBD>ֵ<EFBFBD> json <EFBFBD>ڵ<EFBFBD>
2014-11-19 00:25:21 +08:00
*/
ACL_API void acl_json_node_append(ACL_JSON_NODE *node1, ACL_JSON_NODE *node2);
/**
2015-10-20 21:07:23 +08:00
* <EFBFBD><EFBFBD>ij<EFBFBD><EFBFBD> json <EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>ӽڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD><EFBFBD> json <EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD>
* @param parent {ACL_JSON_NODE*} <EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD>
* @param child {ACL_JSON_NODE*} <EFBFBD>ӽڵ<EFBFBD>
2014-11-19 00:25:21 +08:00
*/
2015-10-20 21:07:23 +08:00
ACL_API void acl_json_node_add_child(
ACL_JSON_NODE *parent, ACL_JSON_NODE *child);
2014-11-19 00:25:21 +08:00
/**
2015-10-20 21:07:23 +08:00
* <EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD> JSON <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> JSON <EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> JSON <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD>һ<EFBFBD><EFBFBD> JSON <EFBFBD>ڵ<EFBFBD><EFBFBD>У<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* Ŀ<EFBFBD><EFBFBD><EFBFBD>´<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> JSON <EFBFBD>ڵ<EFBFBD>
2014-11-19 00:25:21 +08:00
* @param json {ACL_JSON*} Ŀ<EFBFBD><EFBFBD> JSON <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2015-10-20 21:07:23 +08:00
* @param from {ACL_JSON_NODE*} Դ JSON <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD> JSON <EFBFBD>ڵ<EFBFBD>
2014-11-19 00:25:21 +08:00
* @return {ACL_JSON_NODE*} <EFBFBD><EFBFBD><EFBFBD>طǿն<EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
*/
2015-10-20 21:07:23 +08:00
ACL_API ACL_JSON_NODE *acl_json_node_duplicate(
ACL_JSON *json, ACL_JSON_NODE *from);
2014-11-19 00:25:21 +08:00
/**
2015-10-20 21:07:23 +08:00
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD><EFBFBD> json <EFBFBD>ڵ<EFBFBD><EFBFBD>ĸ<EFBFBD><EFBFBD>ڵ<EFBFBD>
* @param node {ACL_JSON_NODE*} json <EFBFBD>ڵ<EFBFBD>
* @return {ACL_JSON_NODE*} <EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ NULL <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2014-11-19 00:25:21 +08:00
*/
ACL_API ACL_JSON_NODE *acl_json_node_parent(ACL_JSON_NODE *node);
/**
2015-10-20 21:07:23 +08:00
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD><EFBFBD> json <EFBFBD>ڵ<EFBFBD><EFBFBD>ĺ<EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD>ֵܽڵ<EFBFBD>
* @param node {ACL_JSON_NODE*} json <EFBFBD>ڵ<EFBFBD>
* @return {ACL_JSON_NODE*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD>ڵ<EFBFBD><EFBFBD>ĺ<EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD>ֵܽڵ<EFBFBD>, <EFBFBD><EFBFBD>ΪNULL<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2014-11-19 00:25:21 +08:00
*/
ACL_API ACL_JSON_NODE *acl_json_node_next(ACL_JSON_NODE *node);
/**
2015-10-20 21:07:23 +08:00
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD><EFBFBD> json <EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD>ǰһ<EFBFBD><EFBFBD><EFBFBD>ֵܽڵ<EFBFBD>
* @param node {ACL_JSON_NODE*} json <EFBFBD>ڵ<EFBFBD>
* @return {ACL_JSON_NODE*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD>ǰһ<EFBFBD><EFBFBD><EFBFBD>ֵܽڵ<EFBFBD>, <EFBFBD><EFBFBD>ΪNULL<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2014-11-19 00:25:21 +08:00
*/
ACL_API ACL_JSON_NODE *acl_json_node_prev(ACL_JSON_NODE *node);
/**
2015-10-20 21:07:23 +08:00
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ json <EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
* @param node {ACL_JSON_NODE*} json <EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @return {const char*} json <EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
2014-11-19 00:25:21 +08:00
*/
ACL_API const char *acl_json_node_type(const ACL_JSON_NODE *node);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @return {ACL_JSON*} <EFBFBD>´<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
ACL_API ACL_JSON *acl_json_alloc(void);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param dbuf {ACL_DBUF_POOL*} <EFBFBD>ڴ<EFBFBD><EFBFBD>ض<EFBFBD><EFBFBD>󣬵<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Է<EFBFBD> NULL ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><EFBFBD>ڴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD><EFBFBD>з<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD><EFBFBD><EFBFBD>
* @return {ACL_JSON*} <EFBFBD>´<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
ACL_API ACL_JSON *acl_json_dbuf_alloc(ACL_DBUF_POOL *dbuf);
2014-11-19 00:25:21 +08:00
/**
2015-10-20 21:07:23 +08:00
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD> JSON <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD> JSON <EFBFBD>ڵ<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD>µ<EFBFBD> JSON <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param node {ACL_JSON_NODE*} Դ JSON <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD> JSON <EFBFBD>ڵ<EFBFBD>
2014-11-19 00:25:21 +08:00
* @return {ACL_JSON*} <EFBFBD>´<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> JSON <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
ACL_API ACL_JSON *acl_json_create(ACL_JSON_NODE *node);
/**
2015-10-20 21:07:23 +08:00
* <EFBFBD><EFBFBD>ijһ<EFBFBD><EFBFBD> ACL_JSON_NODE <EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD>Ϊһ<EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĸ<EFBFBD><EFBFBD>ڵ
* <EFBFBD>Ӷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Է<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ر<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ýڵ<EFBFBD><EFBFBD>ĸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӽڵ<EFBFBD>(<EFBFBD>ڱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* <EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)<EFBFBD><EFBFBD><EFBFBD>ñ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD>б<EFBFBD><EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD>
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ijһ<EFBFBD><EFBFBD> ACL_JSON_NODE <EFBFBD>ڵ<EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD>ܱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD>ӽڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2014-11-19 00:25:21 +08:00
* @param json {ACL_JSON*} json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2015-10-20 21:07:23 +08:00
* @param node {ACL_JSON_NODE*} ACL_JSON_NODE <EFBFBD>ڵ<EFBFBD>
2014-11-19 00:25:21 +08:00
*/
ACL_API void acl_json_foreach_init(ACL_JSON *json, ACL_JSON_NODE *node);
/**
2015-10-20 21:07:23 +08:00
* <EFBFBD>ͷ<EFBFBD>һ<EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>, ͬʱ<EFBFBD>ͷŸö<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD>ڵ<EFBFBD>
2014-11-19 00:25:21 +08:00
* @param json {ACL_JSON*} json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
2015-06-19 16:08:17 +08:00
ACL_API void acl_json_free(ACL_JSON *json);
2014-11-19 00:25:21 +08:00
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param json {ACL_JSON*} json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
ACL_API void acl_json_reset(ACL_JSON *json);
/*------------------------- in acl_json_parse.c ---------------------------*/
/**
2015-10-20 21:07:23 +08:00
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD>
2014-11-19 00:25:21 +08:00
* @param json {ACL_JSON*} json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param data {const char*} <EFBFBD><EFBFBD> '\0' <EFBFBD><EFBFBD>β<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
* Ҳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Dz<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ô˺<EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>; <EFBFBD>ò<EFBFBD><EFBFBD><EFBFBD>
* <EFBFBD><EFBFBD>Ϊ NULL<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD>ӷ<EFBFBD><EFBFBD>ؿմ<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˽<EFBFBD>ֹΪ NULL
* @return {const char*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>󣬸÷<EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD>ʾʣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݵ<EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ
*/
ACL_API const char* acl_json_update(ACL_JSON *json, const char *data);
/**
* <EFBFBD>ж<EFBFBD> JSON <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param json {ACL_JSON*} json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @return {int} <EFBFBD><EFBFBD><EFBFBD>ط<EFBFBD> 0 ֵ<EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾδ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2014-11-19 00:25:21 +08:00
*/
ACL_API int acl_json_finish(ACL_JSON *json);
2014-11-19 00:25:21 +08:00
/*------------------------- in acl_json_util.c ----------------------------*/
2015-10-20 21:07:23 +08:00
/**
* <EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD><EFBFBD>õ<EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬ<EFBFBD><EFBFBD> json <EFBFBD>ڵ<EFBFBD>
* @param json {ACL_JSON*} json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param tag {const char*} <EFBFBD><EFBFBD>ǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @return {ACL_JSON_NODE*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD>ڵ<EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> NULL <EFBFBD><EFBFBD>
* <EFBFBD><EFBFBD>ʾû<EFBFBD>з<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD>ڵ<EFBFBD>
*/
ACL_API ACL_JSON_NODE *acl_json_getFirstElementByTagName(
ACL_JSON *json, const char *tag);
2014-11-19 00:25:21 +08:00
/**
* <EFBFBD>ͷ<EFBFBD><EFBFBD><EFBFBD> acl_json_getElementsByTagName, acl_json_getElementsByName,
* <EFBFBD>Ⱥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>صĶ<EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD>Ϊ<EFBFBD>ö<EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD>
* Ԫ<EFBFBD>ض<EFBFBD><EFBFBD><EFBFBD> ACL_JSON <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԫ<EFBFBD>ص<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷŵ<EFBFBD><EFBFBD>ö<EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, ֻҪ ACL_JSON
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD>, <EFBFBD><EFBFBD>ԭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD>Ԫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><EFBFBD>.
2015-10-20 21:07:23 +08:00
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> xml <EFBFBD>ڵ<EFBFBD>Ԫ<EFBFBD><EFBFBD>
2014-11-19 00:25:21 +08:00
* @param a {ACL_ARRAY*} <EFBFBD><EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
ACL_API void acl_json_free_array(ACL_ARRAY *a);
/**
2015-10-20 21:07:23 +08:00
* <EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬ<EFBFBD><EFBFBD> json <EFBFBD>ڵ<EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD>
2014-11-19 00:25:21 +08:00
* @param json {ACL_JSON*} json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param tag {const char*} <EFBFBD><EFBFBD>ǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2015-10-20 21:07:23 +08:00
* @return {ACL_ARRAY*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD>ڵ<EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> NULL <EFBFBD><EFBFBD>
* <EFBFBD><EFBFBD>ʾû<EFBFBD>з<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD>ڵ<EFBFBD>, <EFBFBD>ǿ<EFBFBD>ֵ<EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> acl_json_free_array <EFBFBD>ͷ<EFBFBD>
2014-11-19 00:25:21 +08:00
*/
2015-10-20 21:07:23 +08:00
ACL_API ACL_ARRAY *acl_json_getElementsByTagName(
ACL_JSON *json, const char *tag);
2014-11-19 00:25:21 +08:00
/**
2015-10-20 21:07:23 +08:00
* <EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬ<EFBFBD><EFBFBD> json <EFBFBD>ڵ<EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD>
2014-11-19 00:25:21 +08:00
* @param json {ACL_JSON*} json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param tags {const char*} <EFBFBD><EFBFBD><EFBFBD>ǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '/' <EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD>
* { 'root': [
* 'first': { 'second': { 'third': 'test1' } },
* 'first': { 'second': { 'third': 'test2' } },
* 'first': { 'second': { 'third': 'test3' } }
* ]
* }
2015-10-20 21:07:23 +08:00
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>root/first/second/third һ<EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>з<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ľڵ<EFBFBD>
* @return {ACL_ARRAY*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD>ڵ<EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> NULL <EFBFBD><EFBFBD>
* <EFBFBD><EFBFBD>ʾû<EFBFBD>з<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD>ڵ<EFBFBD>, <EFBFBD>ǿ<EFBFBD>ֵ<EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> acl_json_free_array <EFBFBD>ͷ<EFBFBD>
2014-11-19 00:25:21 +08:00
*/
2015-10-20 21:07:23 +08:00
ACL_API ACL_ARRAY *acl_json_getElementsByTags(
ACL_JSON *json, const char *tags);
2014-11-19 00:25:21 +08:00
/**
2015-10-20 21:07:23 +08:00
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> json Ҷ<EFBFBD>ڵ<EFBFBD>
2014-11-19 00:25:21 +08:00
* @param json {ACL_JSON*} <EFBFBD><EFBFBD> acl_json_alloc / acl_json_alloc1 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param name {const char*} <EFBFBD><EFBFBD>ǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD>
* @param value {const char*} <EFBFBD><EFBFBD>ǩֵ<EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD>
2015-10-20 21:07:23 +08:00
* @return {ACL_JSON_NODE*} <EFBFBD>´<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ľڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD> ACL_JSON <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ
2014-11-19 00:25:21 +08:00
* һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷţ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD>
*/
ACL_API ACL_JSON_NODE *acl_json_create_text(ACL_JSON *json,
const char *name, const char *value);
#define acl_json_create_leaf acl_json_create_text
/**
2015-10-20 21:07:23 +08:00
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD>Ҷ<EFBFBD>ڵ<EFBFBD>
2014-11-19 00:25:21 +08:00
* @param json {ACL_JSON*} <EFBFBD><EFBFBD> acl_json_alloc / acl_json_alloc1 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param name {const char*} <EFBFBD><EFBFBD>ǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD>
* @param value {int} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
2015-10-20 21:07:23 +08:00
* @return {ACL_JSON_NODE*} <EFBFBD>´<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ľڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD> ACL_JSON <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ
2014-11-19 00:25:21 +08:00
* һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷţ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD>
*/
ACL_API ACL_JSON_NODE *acl_json_create_bool(ACL_JSON *json,
const char *name, int value);
/**
2015-10-20 21:07:23 +08:00
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> json int <EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD>Ҷ<EFBFBD>ڵ<EFBFBD>
2014-11-19 00:25:21 +08:00
* @param json {ACL_JSON*} <EFBFBD><EFBFBD> acl_json_alloc / acl_json_alloc1 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param name {const char*} <EFBFBD><EFBFBD>ǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD>
* @param value {acl_int64} <EFBFBD>з<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
2015-10-20 21:07:23 +08:00
* @return {ACL_JSON_NODE*} <EFBFBD>´<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ľڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD> ACL_JSON <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ
2014-11-19 00:25:21 +08:00
* һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷţ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD>
*/
ACL_API ACL_JSON_NODE *acl_json_create_int64(ACL_JSON *json,
const char *name, acl_int64 value);
/**
2015-10-20 21:07:23 +08:00
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ýڵ<EFBFBD>ֻ<EFBFBD>ܼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2014-11-19 00:25:21 +08:00
* @param json {ACL_JSON*} <EFBFBD><EFBFBD> acl_json_alloc / acl_json_alloc1 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param text {const char*}
2015-10-20 21:07:23 +08:00
* @return {ACL_JSON_NODE*} <EFBFBD>´<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ľڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD> ACL_JSON <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ
2014-11-19 00:25:21 +08:00
* һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷţ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD>
*/
ACL_API ACL_JSON_NODE *acl_json_create_array_text(ACL_JSON *json,
const char *text);
ACL_API ACL_JSON_NODE *acl_json_create_string(ACL_JSON *json,
const char *text);
/**
2015-10-20 21:07:23 +08:00
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD>ڵ<EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ýڵ<EFBFBD>ֻ<EFBFBD>ܼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2014-11-19 00:25:21 +08:00
* @param json {ACL_JSON*} <EFBFBD><EFBFBD> acl_json_alloc / acl_json_alloc1 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param text {const char*}
2015-10-20 21:07:23 +08:00
* @return {ACL_JSON_NODE*} <EFBFBD>´<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ľڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD> ACL_JSON <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ
2014-11-19 00:25:21 +08:00
* һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷţ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD>
*/
ACL_API ACL_JSON_NODE *acl_json_create_array_int64(ACL_JSON *json,
acl_int64 value);
/**
2015-10-20 21:07:23 +08:00
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>IJ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ýڵ<EFBFBD>ֻ<EFBFBD>ܼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2014-11-19 00:25:21 +08:00
* @param json {ACL_JSON*} <EFBFBD><EFBFBD> acl_json_alloc / acl_json_alloc1 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param value {int}
2015-10-20 21:07:23 +08:00
* @return {ACL_JSON_NODE*} <EFBFBD>´<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ľڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD> ACL_JSON <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ
2014-11-19 00:25:21 +08:00
* һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷţ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD>
*/
ACL_API ACL_JSON_NODE *acl_json_create_array_bool(ACL_JSON *json, int value);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> {} <EFBFBD>Ķ<EFBFBD><EFBFBD><EFBFBD>)
* @param json {ACL_JSON*} <EFBFBD><EFBFBD> acl_json_alloc / acl_json_alloc1 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2015-10-20 21:07:23 +08:00
* @return {ACL_JSON_NODE*} <EFBFBD>´<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ľڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD> ACL_JSON <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ
2014-11-19 00:25:21 +08:00
* һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷţ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD>
*/
ACL_API ACL_JSON_NODE *acl_json_create_obj(ACL_JSON *json);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> [] <EFBFBD>Ķ<EFBFBD><EFBFBD><EFBFBD>)
* @param json {ACL_JSON*} <EFBFBD><EFBFBD> acl_json_alloc / acl_json_alloc1 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2015-10-20 21:07:23 +08:00
* @return {ACL_JSON_NODE*} <EFBFBD>´<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ľڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD> ACL_JSON <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ
2014-11-19 00:25:21 +08:00
* һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷţ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD>
*/
ACL_API ACL_JSON_NODE *acl_json_create_array(ACL_JSON *json);
/**
2015-10-20 21:07:23 +08:00
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<EFBFBD><EFBFBD> tagname: ACL_JSON_NODE)
2014-11-19 00:25:21 +08:00
* @param json {ACL_JSON*} <EFBFBD><EFBFBD> acl_json_alloc / acl_json_alloc1 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2015-10-20 21:07:23 +08:00
* @param name {const char*} json <EFBFBD>ڵ<EFBFBD><EFBFBD>ı<EFBFBD>ǩ<EFBFBD><EFBFBD>
* @param value {ACL_JSON_NODE*} json <EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>ǩֵ
* @return {ACL_JSON_NODE*} <EFBFBD>´<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ľڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD> ACL_JSON <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ
2014-11-19 00:25:21 +08:00
* һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷţ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD>
*/
ACL_API ACL_JSON_NODE *acl_json_create_node(ACL_JSON *json,
const char *name, ACL_JSON_NODE *value);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> acl_json_create_obj <EFBFBD><EFBFBD> acl_json_create_array
2015-10-20 21:07:23 +08:00
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> json <EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӽڵ<EFBFBD><EFBFBD><EFBFBD>ӽڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>½ӿڴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ľڵ<EFBFBD>:
2014-11-19 00:25:21 +08:00
* acl_json_create_leaf, acl_json_create_obj, acl_json_create_array
*/
ACL_API void acl_json_node_append_child(ACL_JSON_NODE *parent,
ACL_JSON_NODE *child);
/**
2015-10-20 21:07:23 +08:00
* <EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD> JSON <EFBFBD>ڵ<EFBFBD>ת<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param node {ACL_JSON_NODE*} json <EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2014-11-19 00:25:21 +08:00
* @param buf {ACL_VSTRING*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ò<EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><EFBFBD><EFBFBD>
* <EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD>ͷŵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǿպ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD>ӽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2015-10-20 21:07:23 +08:00
* @return {ACL_VSTRING*} json <EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2014-11-19 00:25:21 +08:00
* <EFBFBD>÷<EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD>Զ<EFBFBD>ǿգ<EFBFBD>ʹ<EFBFBD><EFBFBD><EFBFBD>߿<EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD> ACL_VSTRING_LEN(x) <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>
* <EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD> ACL_VSTRING ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>ú<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* acl_vstring_free <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD>
*/
2015-10-20 21:07:23 +08:00
ACL_API ACL_VSTRING *acl_json_node_build(
ACL_JSON_NODE *json, ACL_VSTRING *buf);
2014-11-19 00:25:21 +08:00
/**
* <EFBFBD><EFBFBD> json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param json {ACL_JSON*} json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param buf {ACL_VSTRING*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ò<EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><EFBFBD><EFBFBD>
* <EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD>ͷŵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǿպ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD>ӽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @return {ACL_VSTRING*} json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>÷<EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD>Զ<EFBFBD>ǿգ<EFBFBD>
* ʹ<EFBFBD><EFBFBD><EFBFBD>߿<EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD> ACL_VSTRING_LEN(x) <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD>Ϊ<EFBFBD>գ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD> ACL_VSTRING
* ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>ú<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> acl_vstring_free <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD>
*/
ACL_API ACL_VSTRING *acl_json_build(ACL_JSON *json, ACL_VSTRING *buf);
/**
* <EFBFBD><EFBFBD>ʽ JSON <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̣<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ú<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڽ<EFBFBD> JSON <EFBFBD><EFBFBD><EFBFBD><EFBFBD>תΪ<EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD>
* һ<EFBFBD><EFBFBD>ת<EFBFBD><EFBFBD>һ<EFBFBD>߽<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߿<EFBFBD><EFBFBD><EFBFBD><EFBFBD>޶<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޶<EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ô<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD>ڵ<EFBFBD>JSON<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD>ɵ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>dz<EFBFBD><EFBFBD><EFBFBD>ʱ(<EFBFBD><EFBFBD><EFBFBD>100 MB),
* <EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽת<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD>
* @param json {ACL_JSON*} json <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param length {size_t} <EFBFBD><EFBFBD>ת<EFBFBD><EFBFBD>Ϊ<EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ó<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>
* <EFBFBD>û<EFBFBD><EFBFBD><EFBFBD>Ļص<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param callback {int (*)(ACL_JSON*, ACL_VSTRING*, void*)} <EFBFBD>û<EFBFBD><EFBFBD><EFBFBD>Ļص<EFBFBD>
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵڶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ NULL ʱ<EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><EFBFBD>ڸûص<EFBFBD>
* <EFBFBD><EFBFBD>ij<EFBFBD>α<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ú󷵻<EFBFBD>ֵ < 0 <EFBFBD><EFBFBD>ֹͣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param ctx {void*} callback <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
ACL_API void acl_json_building(ACL_JSON *json, size_t length,
int (*callback)(ACL_JSON *, ACL_VSTRING *, void *), void *ctx);
2014-11-19 00:25:21 +08:00
#ifdef __cplusplus
}
#endif
#endif