#include <stddef.h>
Go to the source code of this file.
◆ JSMN_API
◆ jsmn_parser
| typedef struct jsmn_parser jsmn_parser |
JSON parser. Contains an array of token blocks available. Also stores the string being parsed now and current position in that string.
◆ jsmntok_t
JSON token description. type type (object, array, string etc.) start start position in JSON data string end end position in JSON data string
◆ jsmnerr
| Enumerator |
|---|
| JSMN_ERROR_NOMEM | |
| JSMN_ERROR_INVAL | |
| JSMN_ERROR_PART | |
◆ 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_init()
Create JSON parser over an array of tokens
Creates a new parser based over a given buffer with an array of tokens available.
◆ jsmn_parse()
| int jsmn_parse |
( |
jsmn_parser * | parser, |
|
|
const char * | js, |
|
|
const size_t | len, |
|
|
jsmntok_t * | tokens, |
|
|
const unsigned int | num_tokens ) |
|
extern |
Run JSON parser. It parses a JSON data string into and array of tokens, each describing a single JSON object.
Parse JSON string and fill tokens.