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