My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Classes | Enumerations | Functions
jsmn.h File Reference
#include <stddef.h>

Go to the source code of this file.

Classes

struct  jsmntok_t
 JSON token description. More...
 
struct  jsmn_parser
 JSON parser. More...
 

Enumerations

enum  jsmntype_t {
  JSMN_UNDEFINED = 0, JSMN_OBJECT = 1, JSMN_ARRAY = 2, JSMN_STRING = 3,
  JSMN_PRIMITIVE = 4, JSMN_UNDEFINED = 0, JSMN_OBJECT = 1, JSMN_ARRAY = 2,
  JSMN_STRING = 3, JSMN_PRIMITIVE = 4
}
 JSON type identifier. More...
 
enum  jsmnerr {
  JSMN_ERROR_NOMEM = -1, JSMN_ERROR_INVAL = -2, JSMN_ERROR_PART = -3, JSMN_ERROR_NOMEM = -1,
  JSMN_ERROR_INVAL = -2, JSMN_ERROR_PART = -3
}
 

Functions

void jsmn_init (jsmn_parser *parser)
 Create JSON parser over an array of tokens. More...
 
int jsmn_parse (jsmn_parser *parser, const char *js, size_t len, jsmntok_t *tokens, unsigned int num_tokens)
 Run JSON parser. More...
 

Enumeration Type Documentation

enum jsmnerr
Enumerator
JSMN_ERROR_NOMEM 
JSMN_ERROR_INVAL 
JSMN_ERROR_PART 
JSMN_ERROR_NOMEM 
JSMN_ERROR_INVAL 
JSMN_ERROR_PART 

Definition at line 46 of file jsmn.h.

enum jsmntype_t

JSON type identifier.

Basic types are: o Object o Array o String o Other primitive: number, boolean (true/false) or null

Enumerator
JSMN_UNDEFINED 
JSMN_OBJECT 
JSMN_ARRAY 
JSMN_STRING 
JSMN_PRIMITIVE 
JSMN_UNDEFINED 
JSMN_OBJECT 
JSMN_ARRAY 
JSMN_STRING 
JSMN_PRIMITIVE 

Definition at line 38 of file jsmn.h.

Function Documentation

void jsmn_init ( jsmn_parser parser)

Create JSON parser over an array of tokens.

Create JSON parser over an array of tokens.

Definition at line 331 of file jsmn.c.

int 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 string into and array of tokens, each describing a single JSON object.

Run JSON parser.

Definition at line 173 of file jsmn.c.