this is fork and i will modify for STM32

Fork of AWS-test by Pierre-Marie Ancèle

Embed: (wiki syntax)

« Back to documentation index

jsmn.c File Reference

jsmn.c File Reference

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

Go to the source code of this file.

Functions

static jsmntok_tjsmn_alloc_token (jsmn_parser *parser, jsmntok_t *tokens, size_t num_tokens)
 Allocates a fresh unused token from the token pull.
static void jsmn_fill_token (jsmntok_t *token, jsmntype_t type, int start, int end)
 Fills token type and boundaries.
static int jsmn_parse_primitive (jsmn_parser *parser, const char *js, size_t len, jsmntok_t *tokens, size_t num_tokens)
 Fills next available token with JSON primitive.
static int jsmn_parse_string (jsmn_parser *parser, const char *js, size_t len, jsmntok_t *tokens, size_t num_tokens)
 Fills next token with JSON string.
int jsmn_parse (jsmn_parser *parser, const char *js, size_t len, jsmntok_t *tokens, unsigned int num_tokens)
 Parse JSON string and fill tokens.
void jsmn_init (jsmn_parser *parser)
 Creates a new parser based over a given buffer with an array of tokens available.

Detailed Description

Implementation of the JSMN (Jasmine) JSON parser.

For more information on JSMN:

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

Definition in file jsmn.c.


Function Documentation

static jsmntok_t* jsmn_alloc_token ( jsmn_parser parser,
jsmntok_t tokens,
size_t  num_tokens 
) [static]

Allocates a fresh unused token from the token pull.

Definition at line 36 of file jsmn.c.

static void jsmn_fill_token ( jsmntok_t token,
jsmntype_t  type,
int  start,
int  end 
) [static]

Fills token type and boundaries.

Definition at line 54 of file jsmn.c.

void jsmn_init ( jsmn_parser parser )

Creates a new parser based over a given buffer with an array of tokens available.

Create JSON parser over an array of tokens.

Definition at line 336 of file jsmn.c.

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

Parse JSON string and fill tokens.

Run JSON parser.

Definition at line 181 of file jsmn.c.

static int jsmn_parse_primitive ( jsmn_parser parser,
const char *  js,
size_t  len,
jsmntok_t tokens,
size_t  num_tokens 
) [static]

Fills next available token with JSON primitive.

Definition at line 65 of file jsmn.c.

static int jsmn_parse_string ( jsmn_parser parser,
const char *  js,
size_t  len,
jsmntok_t tokens,
size_t  num_tokens 
) [static]

Fills next token with JSON string.

Definition at line 114 of file jsmn.c.