AWS IoT Embedded C Device SDK
Data Structures | Macros | Enumerations | Functions
jsmn.h File Reference

Definition of the JSMN (Jasmine) JSON parser. More...

#include <stddef.h>

Go to the source code of this file.

Data Structures

struct  jsmntok_t
 
struct  jsmn_parser
 

Enumerations

enum  jsmntype_t { JSMN_PRIMITIVE = 0, JSMN_OBJECT = 1, JSMN_ARRAY = 2, JSMN_STRING = 3 }
 
enum  jsmnerr_t { JSMN_ERROR_NOMEM = -1, JSMN_ERROR_INVAL = -2, JSMN_ERROR_PART = -3 }
 

Functions

void jsmn_init (jsmn_parser *parser)
 
jsmnerr_t jsmn_parse (jsmn_parser *parser, const char *js, size_t len, jsmntok_t *tokens, unsigned int num_tokens)
 

Detailed Description

For more information on JSMN:

See also
http://zserge.com/jsmn.html

Enumeration Type Documentation

enum jsmntype_t

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

Function Documentation

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.

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

Parse JSON string and fill tokens.