diff options
author | Gabriel Gritsch <gabriel@gritsch-soft.com> | 2014-02-21 09:52:23 +0100 |
---|---|---|
committer | Gabriel Gritsch <gabriel@gritsch-soft.com> | 2014-02-21 09:52:23 +0100 |
commit | a89501b2fbc4fa30b0653328931cf7d9162851e6 (patch) | |
tree | f46615690913eb75c3fa159c0eda1750bd9fb80c /jsmn.h | |
parent | 733b8e958e64196b5f440fe5d631e45c7445a094 (diff) |
Integrate changes made by Serge Zaitsev.
Diffstat (limited to 'jsmn.h')
-rw-r--r-- | jsmn.h | 21 |
1 files changed, 2 insertions, 19 deletions
@@ -1,10 +1,6 @@ #ifndef __JSMN_H_ #define __JSMN_H_ -#ifdef __cplusplus -extern "C" { -#endif - /** * JSON type identifier. Basic types are: * o Object @@ -26,8 +22,6 @@ typedef enum { JSMN_ERROR_INVAL = -2, /* The string is not a full JSON packet, more bytes expected */ JSMN_ERROR_PART = -3, - /* Everything was fine */ - JSMN_SUCCESS = 0 } jsmnerr_t; /** @@ -62,21 +56,10 @@ typedef struct { void jsmn_init(jsmn_parser *parser); /** - * Run JSON parser. It parses a JSON data null-terminated-string into and array of tokens, each describing + * Run JSON parser. It parses a JSON data string into and array of tokens, each describing * a single JSON object. */ -static inline jsmnerr_t jsmn_parse(jsmn_parser *parser, const char *js, +jsmnerr_t jsmn_parse(jsmn_parser *parser, const char *js, size_t len, jsmntok_t *tokens, unsigned int num_tokens); -/** - * Run JSON parser. It parses a JSON data buffer with specified length into and array of tokens, each describing - * a single JSON object. - */ -jsmnerr_t jsmn_parseV2(jsmn_parser *parser, const char *js, size_t js_length, - jsmntok_t *tokens, unsigned int num_tokens); - -#ifdef __cplusplus -} -#endif - #endif /* __JSMN_H_ */ |