summaryrefslogtreecommitdiffstats
path: root/src/jsmn.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/jsmn.h')
-rw-r--r--src/jsmn.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/jsmn.h b/src/jsmn.h
index f12dc5a..380744d 100644
--- a/src/jsmn.h
+++ b/src/jsmn.h
@@ -72,6 +72,7 @@ typedef struct {
*/
typedef struct {
unsigned int pos; /* offset in the JSON string */
+ unsigned int end; /* offset after last character of JSON string */
int toknext; /* next token to allocate */
int toksuper; /* superior token node, e.g parent object or array */
} jsmn_parser;
@@ -85,7 +86,7 @@ void jsmn_init(jsmn_parser *parser);
* Run JSON parser. It parses a JSON data string into and array of tokens, each describing
* a single JSON object.
*/
-jsmnerr_t jsmn_parse(jsmn_parser *parser, const char *js,
+jsmnerr_t jsmn_parse(jsmn_parser *parser, const char *js, unsigned int length,
jsmntok_t *tokens, unsigned int num_tokens);
#endif /* __JSMN_H_ */