|
PEBL 2.2
Psychology Experiment Building Language - Cross-platform psychological experiment development system
|
#include <stddef.h>Go to the source code of this file.
Classes | |
| struct | jsmntok_t |
| struct | jsmn_parser |
Macros | |
| #define | JSMN_API extern |
Enumerations | |
| enum | jsmntype_t { JSMN_UNDEFINED = 0 , JSMN_OBJECT = 1 , JSMN_ARRAY = 2 , JSMN_STRING = 3 , JSMN_PRIMITIVE = 4 } |
| enum | jsmnerr { JSMN_ERROR_NOMEM = -1 , JSMN_ERROR_INVAL = -2 , JSMN_ERROR_PART = -3 } |
Functions | |
| JSMN_API void | jsmn_init (jsmn_parser *parser) |
| JSMN_API int | jsmn_parse (jsmn_parser *parser, const char *js, const size_t len, jsmntok_t *tokens, const unsigned int num_tokens) |
| enum jsmnerr |
| Enumerator | |
|---|---|
| JSMN_ERROR_NOMEM | |
| JSMN_ERROR_INVAL | |
| JSMN_ERROR_PART | |
Definition at line 54 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 | |
Definition at line 46 of file jsmn.h.
| JSMN_API void jsmn_init | ( | jsmn_parser * | parser | ) |
Create JSON parser over an array of tokens
Creates a new parser based over a given buffer with an array of tokens available.
Definition at line 456 of file jsmn.h.
References jsmn_parser::pos, jsmn_parser::toknext, and jsmn_parser::toksuper.
Referenced by PEBLUtility::ParseJSON().
| JSMN_API int jsmn_parse | ( | jsmn_parser * | parser, |
| const char * | js, | ||
| const size_t | len, | ||
| jsmntok_t * | tokens, | ||
| const unsigned int | num_tokens | ||
| ) |
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.
Definition at line 265 of file jsmn.h.
References count, jsmntok_t::end, JSMN_ARRAY, JSMN_ERROR_INVAL, JSMN_ERROR_NOMEM, JSMN_ERROR_PART, JSMN_OBJECT, JSMN_STRING, NULL, jsmn_parser::pos, jsmntok_t::size, jsmntok_t::start, jsmn_parser::toknext, jsmn_parser::toksuper, and jsmntok_t::type.
Referenced by PEBLUtility::ParseJSON().