MegaWiFi 1.5
MegaWiFi API documentation
json.h File Reference

JSON implementation, based on jsmn by Serge Zaitsev. More...

#include <stdbool.h>
#include "jsmn.h"

Go to the source code of this file.

Macros

#define JSMN_STATIC
 Hides jsmn API definitions to avoid linking errors. More...
 
#define json_item(json_str, obj_tok, idx)
 

Functions

int json_null_terminate (char *json_str, const jsmntok_t *obj_tok, int num_tok)
 Add null-terminators to the input JSON string. Useful to further extract token values as null-terminated strings. More...
 
bool json_is_key (const jsmntok_t *json_tok, int obj_idx, int num_tok)
 Determines if pointed token corresponds to a key in a key:value pair. More...
 
int json_object_next (const jsmntok_t *obj_tok, int obj_idx, int parent_idx, int num_tok)
 Return the index of the next item. This function only works properly when specified token is of JSMN_OBJECT type. More...
 
int json_key_next (const jsmntok_t *json_tok, int obj_idx, int parent_idx, int num_tok)
 Return the index of the next key in the current JSON level. More...
 
int json_key_search (const char *key, const char *json_str, const jsmntok_t *json_tok, int obj_idx, int parent_idx, int num_tok)
 Search for a given key in the current JSON level. More...
 
int json_bool_get (const char *json_str, const jsmntok_t *json_tok, int obj_idx)
 Obtains the boolean value corresponding to the indicated token. More...
 

Detailed Description

JSON implementation, based on jsmn by Serge Zaitsev.

Definition in file json.h.