65,211
社区成员
发帖
与我相关
我的任务
分享
/***********
* JSON_parser.c
************/
typedef struct JSON_parser_struct {
JSON_parser_callback callback;
void* ctx;
signed char state, before_comment_state, type, escaped, comment, allow_comments, handle_floats_manually;
long depth;
long top;
signed char* stack;
long stack_capacity;
signed char static_stack[JSON_PARSER_STACK_SIZE];
char* parse_buffer;
size_t parse_buffer_capacity;
size_t parse_buffer_count;
size_t comment_begin_offset;
char static_parse_buffer[JSON_PARSER_PARSE_BUFFER_SIZE];
} * JSON_parser;
/***********
* JSONHandler.h
************/
class CJsonHandler: public CActive
{
public:
static int GetValues(void* ctx, int type, const JSON_value* value);
...
private:
static struct JSON_parser_struct* iJc;
};
/***********
* JSONHandler.cpp
************/
static int CJsonHandler::GetValues(void* ctx, int type, const JSON_value* value)
{
............
TInt state = iJc->stack[iJc->top]//出错
............
}