Data Structures | Functions | Variables
cJSON.c File Reference
#include <string.h>
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <float.h>
#include <limits.h>
#include <ctype.h>
#include "cJSON.h"
+ Include dependency graph for cJSON.c:

Data Structures

struct  printbuffer
 

Functions

void cJSON_AddItemReferenceToArray (cJSON *array, cJSON *item)
 
void cJSON_AddItemReferenceToObject (cJSON *object, const char *string, cJSON *item)
 
void cJSON_AddItemToArray (cJSON *array, cJSON *item)
 
void cJSON_AddItemToObject (cJSON *object, const char *string, cJSON *item)
 
void cJSON_AddItemToObjectCS (cJSON *object, const char *string, cJSON *item)
 
cJSONcJSON_CreateArray (void)
 
cJSONcJSON_CreateBool (int b)
 
cJSONcJSON_CreateDoubleArray (const double *numbers, int count)
 
cJSONcJSON_CreateFalse (void)
 
cJSONcJSON_CreateFloatArray (const float *numbers, int count)
 
cJSONcJSON_CreateIntArray (const int *numbers, int count)
 
cJSONcJSON_CreateNull (void)
 
cJSONcJSON_CreateNumber (double num)
 
cJSONcJSON_CreateObject (void)
 
cJSONcJSON_CreateString (const char *string)
 
cJSONcJSON_CreateStringArray (const char **strings, int count)
 
cJSONcJSON_CreateTrue (void)
 
void cJSON_Delete (cJSON *c)
 
void cJSON_DeleteItemFromArray (cJSON *array, int which)
 
void cJSON_DeleteItemFromObject (cJSON *object, const char *string)
 
cJSONcJSON_DetachItemFromArray (cJSON *array, int which)
 
cJSONcJSON_DetachItemFromObject (cJSON *object, const char *string)
 
cJSONcJSON_Duplicate (cJSON *item, int recurse)
 
cJSONcJSON_GetArrayItem (cJSON *array, int item)
 
int cJSON_GetArraySize (cJSON *array)
 
const char * cJSON_GetErrorPtr (void)
 
cJSONcJSON_GetObjectItem (cJSON *object, const char *string)
 
void cJSON_InitHooks (cJSON_Hooks *hooks)
 
void cJSON_InsertItemInArray (cJSON *array, int which, cJSON *newitem)
 
void cJSON_Minify (char *json)
 
static cJSONcJSON_New_Item (void)
 
cJSONcJSON_Parse (const char *value)
 
cJSONcJSON_ParseWithOpts (const char *value, const char **return_parse_end, int require_null_terminated)
 
char * cJSON_Print (cJSON *item)
 
char * cJSON_PrintBuffered (cJSON *item, int prebuffer, int fmt)
 
char * cJSON_PrintUnformatted (cJSON *item)
 
void cJSON_ReplaceItemInArray (cJSON *array, int which, cJSON *newitem)
 
void cJSON_ReplaceItemInObject (cJSON *object, const char *string, cJSON *newitem)
 
static int cJSON_strcasecmp (const char *s1, const char *s2)
 
static char * cJSON_strdup (const char *str)
 
static cJSONcreate_reference (cJSON *item)
 
static char * ensure (printbuffer *p, int needed)
 
static const char * parse_array (cJSON *item, const char *value)
 
static unsigned parse_hex4 (const char *str)
 
static const char * parse_number (cJSON *item, const char *num)
 
static const char * parse_object (cJSON *item, const char *value)
 
static const char * parse_string (cJSON *item, const char *str)
 
static const char * parse_value (cJSON *item, const char *value)
 
static int pow2gt (int x)
 
static char * print_array (cJSON *item, int depth, int fmt, printbuffer *p)
 
static char * print_number (cJSON *item, printbuffer *p)
 
static char * print_object (cJSON *item, int depth, int fmt, printbuffer *p)
 
static char * print_string (cJSON *item, printbuffer *p)
 
static char * print_string_ptr (const char *str, printbuffer *p)
 
static char * print_value (cJSON *item, int depth, int fmt, printbuffer *p)
 
static const char * skip (const char *in)
 
static void suffix_object (cJSON *prev, cJSON *item)
 
static int update (printbuffer *p)
 

Variables

static void(* cJSON_free )(void *ptr) = free
 
static void *(* cJSON_malloc )(size_t sz) = malloc
 
static const char * ep
 
static const unsigned char firstByteMark [7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }
 

Function Documentation

void cJSON_AddItemReferenceToArray ( cJSON array,
cJSON item 
)

+ Here is the call graph for this function:

void cJSON_AddItemReferenceToObject ( cJSON object,
const char *  string,
cJSON item 
)

+ Here is the call graph for this function:

void cJSON_AddItemToArray ( cJSON array,
cJSON item 
)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cJSON_AddItemToObject ( cJSON object,
const char *  string,
cJSON item 
)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cJSON_AddItemToObjectCS ( cJSON object,
const char *  string,
cJSON item 
)

+ Here is the call graph for this function:

cJSON* cJSON_CreateArray ( void  )

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

cJSON* cJSON_CreateBool ( int  b)

+ Here is the call graph for this function:

cJSON* cJSON_CreateDoubleArray ( const double *  numbers,
int  count 
)

+ Here is the call graph for this function:

cJSON* cJSON_CreateFalse ( void  )

+ Here is the call graph for this function:

cJSON* cJSON_CreateFloatArray ( const float *  numbers,
int  count 
)

+ Here is the call graph for this function:

cJSON* cJSON_CreateIntArray ( const int *  numbers,
int  count 
)

+ Here is the call graph for this function:

cJSON* cJSON_CreateNull ( void  )

+ Here is the call graph for this function:

cJSON* cJSON_CreateNumber ( double  num)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

cJSON* cJSON_CreateObject ( void  )

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

cJSON* cJSON_CreateString ( const char *  string)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

cJSON* cJSON_CreateStringArray ( const char **  strings,
int  count 
)

+ Here is the call graph for this function:

cJSON* cJSON_CreateTrue ( void  )

+ Here is the call graph for this function:

void cJSON_Delete ( cJSON c)

+ Here is the caller graph for this function:

void cJSON_DeleteItemFromArray ( cJSON array,
int  which 
)

+ Here is the call graph for this function:

void cJSON_DeleteItemFromObject ( cJSON object,
const char *  string 
)

+ Here is the call graph for this function:

cJSON* cJSON_DetachItemFromArray ( cJSON array,
int  which 
)

+ Here is the caller graph for this function:

cJSON* cJSON_DetachItemFromObject ( cJSON object,
const char *  string 
)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

cJSON* cJSON_Duplicate ( cJSON item,
int  recurse 
)

+ Here is the call graph for this function:

cJSON* cJSON_GetArrayItem ( cJSON array,
int  item 
)
int cJSON_GetArraySize ( cJSON array)
const char* cJSON_GetErrorPtr ( void  )
cJSON* cJSON_GetObjectItem ( cJSON object,
const char *  string 
)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cJSON_InitHooks ( cJSON_Hooks hooks)
void cJSON_InsertItemInArray ( cJSON array,
int  which,
cJSON newitem 
)

+ Here is the call graph for this function:

void cJSON_Minify ( char *  json)

+ Here is the caller graph for this function:

static cJSON* cJSON_New_Item ( void  )
static

+ Here is the caller graph for this function:

cJSON* cJSON_Parse ( const char *  value)

+ Here is the call graph for this function:

cJSON* cJSON_ParseWithOpts ( const char *  value,
const char **  return_parse_end,
int  require_null_terminated 
)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

char* cJSON_Print ( cJSON item)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

char* cJSON_PrintBuffered ( cJSON item,
int  prebuffer,
int  fmt 
)

+ Here is the call graph for this function:

char* cJSON_PrintUnformatted ( cJSON item)

+ Here is the call graph for this function:

void cJSON_ReplaceItemInArray ( cJSON array,
int  which,
cJSON newitem 
)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cJSON_ReplaceItemInObject ( cJSON object,
const char *  string,
cJSON newitem 
)

+ Here is the call graph for this function:

static int cJSON_strcasecmp ( const char *  s1,
const char *  s2 
)
static

+ Here is the caller graph for this function:

static char* cJSON_strdup ( const char *  str)
static

+ Here is the caller graph for this function:

static cJSON* create_reference ( cJSON item)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static char* ensure ( printbuffer p,
int  needed 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static const char * parse_array ( cJSON item,
const char *  value 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static unsigned parse_hex4 ( const char *  str)
static

+ Here is the caller graph for this function:

static const char* parse_number ( cJSON item,
const char *  num 
)
static

+ Here is the caller graph for this function:

static const char * parse_object ( cJSON item,
const char *  value 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static const char* parse_string ( cJSON item,
const char *  str 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static const char * parse_value ( cJSON item,
const char *  value 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int pow2gt ( int  x)
static

+ Here is the caller graph for this function:

static char * print_array ( cJSON item,
int  depth,
int  fmt,
printbuffer p 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static char* print_number ( cJSON item,
printbuffer p 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static char * print_object ( cJSON item,
int  depth,
int  fmt,
printbuffer p 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static char* print_string ( cJSON item,
printbuffer p 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static char* print_string_ptr ( const char *  str,
printbuffer p 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static char * print_value ( cJSON item,
int  depth,
int  fmt,
printbuffer p 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static const char* skip ( const char *  in)
static

+ Here is the caller graph for this function:

static void suffix_object ( cJSON prev,
cJSON item 
)
static

+ Here is the caller graph for this function:

static int update ( printbuffer p)
static

+ Here is the caller graph for this function:

Variable Documentation

void(* cJSON_free)(void *ptr) = free
static
void*(* cJSON_malloc)(size_t sz) = malloc
static
const char* ep
static
const unsigned char firstByteMark[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }
static

This documentation file has been automatically generated on Wed May 6 2020 20:45:07 by doxygen 1.8.8