Modules
ADT Database GTK2 GUI IP PiJAX Public Sql Stdio Subversion System Tools Xosd lua v4l2 wx
Recent Changes
Public.Parser.XML2 1.50
Public.ZeroMQ 1.1
Public.Template.Mustache 1.0
Public.Protocols.XMPP 1.4
Sql.Provider.jdbc 1.0
Popular Downloads
Public.Parser.JSON2 1.0
Public.Parser.JSON 0.2
GTK2 2.23
Public.Web.FCGI 1.8
Public.Parser.XML2 1.48
|
Module Information
Public.Parser.JSON2
Viewing contents of Public_Parser_JSON2-0.6/json.h
#define PUSH_SPECIAL(X) if (!state->validate) { \
push_text("Public.Parser.JSON2." X); \
APPLY_MASTER("resolv", 1); \
if (((struct svalue*)(Pike_sp - 1))->type != PIKE_T_OBJECT) { \
Pike_error("Could not resolv program '%s'\n.", \
"Public.Parser.JSON2." X ); \
} \
}
#define PARSE(X, FPC) \
state->level++; \
i = _parse_JSON_##X(FPC, pe, state); \
state->level--; \
if (i == NULL) { \
return NULL; \
} \
c++; \
#define JSON_CONVERT(a,b) do { \
b=(p_wchar2 *)malloc(sizeof(int) * a->len); \
if (b == NULL) { \
Pike_error("Not enough memory while Parsing.\n"); \
} \
switch (a->size_shift) { \
case 0: \
convert_0_to_2(b,STR0(a), a->len); \
break; \
case 1: \
convert_1_to_2(b,STR1(a), a->len); \
break; \
case 2: \
b = STR2(a); \
break; \
} } while (0)
struct parser_state {
unsigned int level;
short validate;
p_wchar2 *start, *stop;
#ifdef JSON_CUSTOM_TYPES
struct mapping *custom_chars;
#endif
struct pike_string *data;
};
|
|
|