summaryrefslogtreecommitdiff
path: root/jsmn.h
diff options
context:
space:
mode:
authorGabriel Gritsch <gabriel@gritsch-soft.com>2014-02-21 09:52:23 +0100
committerGabriel Gritsch <gabriel@gritsch-soft.com>2014-02-21 09:52:23 +0100
commita89501b2fbc4fa30b0653328931cf7d9162851e6 (patch)
treef46615690913eb75c3fa159c0eda1750bd9fb80c /jsmn.h
parent733b8e958e64196b5f440fe5d631e45c7445a094 (diff)
Integrate changes made by Serge Zaitsev.
Diffstat (limited to 'jsmn.h')
-rw-r--r--jsmn.h21
1 files changed, 2 insertions, 19 deletions
diff --git a/jsmn.h b/jsmn.h
index 8f10cf9df..54930ad55 100644
--- a/jsmn.h
+++ b/jsmn.h
@@ -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_ */