summaryrefslogtreecommitdiff
path: root/epan/jsmn/jsmn.h
diff options
context:
space:
mode:
Diffstat (limited to 'epan/jsmn/jsmn.h')
-rw-r--r--epan/jsmn/jsmn.h52
1 files changed, 26 insertions, 26 deletions
diff --git a/epan/jsmn/jsmn.h b/epan/jsmn/jsmn.h
index 9644f42380..458e7d447b 100644
--- a/epan/jsmn/jsmn.h
+++ b/epan/jsmn/jsmn.h
@@ -31,25 +31,25 @@ extern "C" {
/**
* JSON type identifier. Basic types are:
- * o Object
- * o Array
- * o String
- * o Other primitive: number, boolean (true/false) or null
+ * o Object
+ * o Array
+ * o String
+ * o Other primitive: number, boolean (true/false) or null
*/
typedef enum {
- JSMN_PRIMITIVE = 0,
- JSMN_OBJECT = 1,
- JSMN_ARRAY = 2,
- JSMN_STRING = 3
+ JSMN_PRIMITIVE = 0,
+ JSMN_OBJECT = 1,
+ JSMN_ARRAY = 2,
+ JSMN_STRING = 3
} jsmntype_t;
typedef enum {
- /* Not enough tokens were provided */
- JSMN_ERROR_NOMEM = -1,
- /* Invalid character inside JSON string */
- JSMN_ERROR_INVAL = -2,
- /* The string is not a full JSON packet, more bytes expected */
- JSMN_ERROR_PART = -3
+ /* Not enough tokens were provided */
+ JSMN_ERROR_NOMEM = -1,
+ /* Invalid character inside JSON string */
+ JSMN_ERROR_INVAL = -2,
+ /* The string is not a full JSON packet, more bytes expected */
+ JSMN_ERROR_PART = -3
} jsmnerr_t;
/**
@@ -60,12 +60,12 @@ typedef enum {
* size the size of the token
*/
typedef struct {
- jsmntype_t type;
- int start;
- int end;
- int size;
+ jsmntype_t type;
+ int start;
+ int end;
+ int size;
#ifdef JSMN_PARENT_LINKS
- int parent;
+ int parent;
#endif
} jsmntok_t;
@@ -74,9 +74,9 @@ typedef struct {
* the string being parsed now and current position in that string
*/
typedef struct {
- unsigned int pos; /* offset in the JSON string */
- unsigned int toknext; /* next token to allocate */
- int toksuper; /* superior token node, e.g parent object or array */
+ unsigned int pos; /* offset in the JSON string */
+ unsigned int toknext; /* next token to allocate */
+ int toksuper; /* superior token node, e.g parent object or array */
} jsmn_parser;
/**
@@ -89,7 +89,7 @@ void jsmn_init(jsmn_parser *parser);
* a single JSON object.
*/
int jsmn_parse(jsmn_parser *parser, const char *js, size_t len,
- jsmntok_t *tokens, unsigned int num_tokens);
+ jsmntok_t *tokens, unsigned int num_tokens);
#ifdef __cplusplus
}
@@ -102,10 +102,10 @@ int jsmn_parse(jsmn_parser *parser, const char *js, size_t len,
*
* Local variables:
* c-basic-offset: 4
- * tab-width: 4
+ * tab-width: 8
* indent-tabs-mode: nil
* End:
*
- * vi: set shiftwidth=4 tabstop=4 expandtab:
- * :indentSize=4:tabSize=4:noTabs=true:
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=9:noTabs=true:
*/