11 * JSON type identifier. Basic types are:
15 * o Other primitive: number, boolean (true/false) or null
25 /* Not enough tokens were provided */
26 JSMN_ERROR_NOMEM = -1,
27 /* Invalid character inside JSON string */
28 JSMN_ERROR_INVAL = -2,
29 /* The string is not a full JSON packet, more bytes expected */
34 * JSON token description.
35 * @param type type (object, array, string etc.)
36 * @param start start position in JSON data string
37 * @param end end position in JSON data string
44 #ifdef JSMN_PARENT_LINKS
50 * JSON parser. Contains an array of token blocks available. Also stores
51 * the string being parsed now and current position in that string
54 unsigned int pos; /* offset in the JSON string */
55 unsigned int toknext; /* next token to allocate */
56 int toksuper; /* superior token node, e.g parent object or array */
60 * Create JSON parser over an array of tokens
62 void jsmn_init(jsmn_parser *parser);
65 * Run JSON parser. It parses a JSON data string into and array of tokens, each describing
66 * a single JSON object.
68 jsmnerr_t jsmn_parse(jsmn_parser *parser, const char *js, size_t len,
69 jsmntok_t *tokens, unsigned int num_tokens);
75 #endif /* __JSMN_H_ */