Macros | Functions | Variables
json_tokener.c File Reference
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <strings.h>
#include "bits.h"
#include "debug.h"
#include "printbuf.h"
#include "arraylist.h"
#include "json_object.h"
#include "json_tokener.h"
Include dependency graph for json_tokener.c:

Go to the source code of this file.

Macros

#define current   tok->stack[tok->depth].current
 
#define obj_field_name   tok->stack[tok->depth].obj_field_name
 
#define saved_state   tok->stack[tok->depth].saved_state
 
#define state   tok->stack[tok->depth].state
 

Functions

char * json_c_strndup (const char *str, size_t n)
 
void json_tokener_free (struct json_tokener *tok)
 
struct json_tokenerjson_tokener_new ()
 
struct json_objectjson_tokener_parse (const char *str)
 
struct json_objectjson_tokener_parse_ex (struct json_tokener *tok, const char *str, int len)
 
void json_tokener_reset (struct json_tokener *tok)
 
static void json_tokener_reset_level (struct json_tokener *tok, int depth)
 

Variables

static const char * json_false_str = "false"
 
static const char * json_null_str = "null"
 
const char * json_tokener_errors []
 
static const char * json_true_str = "true"
 

Macro Definition Documentation

#define current   tok->stack[tok->depth].current

Definition at line 130 of file json_tokener.c.

#define obj_field_name   tok->stack[tok->depth].obj_field_name

Definition at line 131 of file json_tokener.c.

#define saved_state   tok->stack[tok->depth].saved_state

Definition at line 129 of file json_tokener.c.

#define state   tok->stack[tok->depth].state

Definition at line 128 of file json_tokener.c.

Function Documentation

char* json_c_strndup ( const char *  str,
size_t  n 
)

Definition at line 108 of file json_tokener.c.

void json_tokener_free ( struct json_tokener tok)

Definition at line 66 of file json_tokener.c.

struct json_tokener* json_tokener_new ( void  )

Definition at line 58 of file json_tokener.c.

struct json_object* json_tokener_parse ( const char *  str)

Definition at line 92 of file json_tokener.c.

struct json_object* json_tokener_parse_ex ( struct json_tokener tok,
const char *  str,
int  len 
)

Definition at line 133 of file json_tokener.c.

void json_tokener_reset ( struct json_tokener tok)

Definition at line 83 of file json_tokener.c.

static void json_tokener_reset_level ( struct json_tokener tok,
int  depth 
)
static

Definition at line 73 of file json_tokener.c.

Variable Documentation

const char* json_false_str = "false"
static

Definition at line 38 of file json_tokener.c.

const char* json_null_str = "null"
static

Definition at line 36 of file json_tokener.c.

const char* json_tokener_errors[]
Initial value:
= {
"success",
"continue",
"nesting to deep",
"unexpected end of data",
"unexpected character",
"null expected",
"boolean expected",
"number expected",
"array value separator ',' expected",
"quoted object property name expected",
"object property name separator ':' expected",
"object value separator ',' expected",
"invalid string sequence",
"expected comment",
}

Definition at line 40 of file json_tokener.c.

const char* json_true_str = "true"
static

Definition at line 37 of file json_tokener.c.



csm
Author(s): Andrea Censi
autogenerated on Tue May 11 2021 02:18:23