#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include "jsmn.h"
#include "json.h"
#include <linux/kernel.h>
Go to the source code of this file.
|
#define | LOOKUP(a, i) ((i) < (sizeof(a)/sizeof(*(a))) ? ((a)[i]) : "?") |
|
|
static char * | mapfile (const char *fn, size_t *size) |
|
static void | unmapfile (char *map, size_t size) |
|
jsmntok_t * | parse_json (const char *fn, char **map, size_t *size, int *len) |
|
void | free_json (char *map, size_t size, jsmntok_t *tokens) |
|
static int | countchar (char *map, char c, int end) |
|
int | json_line (char *map, jsmntok_t *t) |
|
const char * | json_name (jsmntok_t *t) |
|
int | json_len (jsmntok_t *t) |
|
int | json_streq (char *map, jsmntok_t *t, const char *s) |
|
◆ LOOKUP
#define LOOKUP |
( |
|
a, |
|
|
|
i |
|
) |
| ((i) < (sizeof(a)/sizeof(*(a))) ? ((a)[i]) : "?") |
◆ countchar()
static int countchar |
( |
char * |
map, |
|
|
char |
c, |
|
|
int |
end |
|
) |
| |
|
static |
◆ free_json()
void free_json |
( |
char * |
map, |
|
|
size_t |
size, |
|
|
jsmntok_t * |
tokens |
|
) |
| |
◆ json_len()
◆ json_line()
◆ json_name()
◆ json_streq()
int json_streq |
( |
char * |
map, |
|
|
jsmntok_t * |
t, |
|
|
const char * |
s |
|
) |
| |
◆ mapfile()
static char* mapfile |
( |
const char * |
fn, |
|
|
size_t * |
size |
|
) |
| |
|
static |
◆ parse_json()
jsmntok_t* parse_json |
( |
const char * |
fn, |
|
|
char ** |
map, |
|
|
size_t * |
size, |
|
|
int * |
len |
|
) |
| |
◆ unmapfile()
static void unmapfile |
( |
char * |
map, |
|
|
size_t |
size |
|
) |
| |
|
static |
◆ jsmn_types
const char* const jsmn_types[] |
|
static |
Initial value:
Definition at line 137 of file json.c.