38#ifdef JSONPARSE_CONF_MAX_DEPTH
39#define JSONPARSE_MAX_DEPTH JSONPARSE_CONF_MAX_DEPTH
41#define JSONPARSE_MAX_DEPTH 10
44struct jsonparse_state {
54 char stack[JSONPARSE_MAX_DEPTH];
66void jsonparse_setup(
struct jsonparse_state *state,
const char *json,
70int jsonparse_next(
struct jsonparse_state *state);
73int jsonparse_copy_value(
struct jsonparse_state *state,
char *buf,
77int jsonparse_get_value_as_int(
struct jsonparse_state *state);
80long jsonparse_get_value_as_long(
struct jsonparse_state *state);
83int jsonparse_get_len(
struct jsonparse_state *state);
86int jsonparse_get_type(
struct jsonparse_state *state);
89int jsonparse_strcmp_value(
struct jsonparse_state *state,
const char *str);
A few JSON defines used for parsing and generating JSON.