lazybios 3.0.0
Lightweight SMBIOS/DMI parsing library
Loading...
Searching...
No Matches
cJSON.h File Reference
#include <stddef.h>

Go to the source code of this file.

Data Structures

struct  cJSON
struct  cJSON_Hooks

Macros

#define cJSON_Array   (1 << 5)
#define cJSON_ArrayForEach(element, array)
#define CJSON_CDECL
#define CJSON_CIRCULAR_LIMIT   10000
#define cJSON_False   (1 << 0)
#define cJSON_Invalid   (0)
#define cJSON_IsReference   256
#define CJSON_NESTING_LIMIT   1000
#define cJSON_NULL   (1 << 2)
#define cJSON_Number   (1 << 3)
#define cJSON_Object   (1 << 6)
#define CJSON_PUBLIC(type)
#define cJSON_Raw   (1 << 7)
#define cJSON_SetBoolValue(object, boolValue)
#define cJSON_SetIntValue(object, number)
#define cJSON_SetNumberValue(object, number)
#define CJSON_STDCALL
#define cJSON_String   (1 << 4)
#define cJSON_StringIsConst   512
#define cJSON_True   (1 << 1)
#define CJSON_VERSION_MAJOR   1
#define CJSON_VERSION_MINOR   7
#define CJSON_VERSION_PATCH   19

Typedefs

typedef int cJSON_bool

Functions

 CJSON_PUBLIC (char *) cJSON_Print(const cJSON *item)
 CJSON_PUBLIC (cJSON *) cJSON_Parse(const char *value)
 CJSON_PUBLIC (cJSON_bool) cJSON_PrintPreallocated(cJSON *item
 CJSON_PUBLIC (const char *) cJSON_Version(void)
 CJSON_PUBLIC (double) cJSON_GetNumberValue(const cJSON *const item)
 CJSON_PUBLIC (void *) cJSON_malloc(size_t size)
 CJSON_PUBLIC (void) cJSON_InitHooks(cJSON_Hooks *hooks)

Variables

const cJSON *const b
const char *const const cJSON_bool boolean
char * buffer
size_t buffer_length
const cJSON *const const cJSON_bool case_sensitive
int count
int cJSON_bool fmt
char const int const cJSON_bool format
int index
cJSONitem
char const int length
const char *const name
int cJSONnewitem
const char *const const double number
int prebuffer
const char *const const char *const raw
cJSON_bool recurse
cJSON *const cJSONreplacement
const char cJSON_bool require_null_terminated
const char ** return_parse_end
const char *const string
const char * valuestring
int which

Macro Definition Documentation

◆ cJSON_Array

#define cJSON_Array   (1 << 5)

Definition at line 95 of file cJSON.h.

◆ cJSON_ArrayForEach

#define cJSON_ArrayForEach ( element,
array )
Value:
for(element = (array != NULL) ? (array)->child : NULL; element != NULL; element = element->next)

Definition at line 296 of file cJSON.h.

◆ CJSON_CDECL

#define CJSON_CDECL

Definition at line 71 of file cJSON.h.

Referenced by cJSON_Hooks::malloc_fn(), and cJSON_Hooks::void().

◆ CJSON_CIRCULAR_LIMIT

#define CJSON_CIRCULAR_LIMIT   10000

Definition at line 143 of file cJSON.h.

◆ cJSON_False

#define cJSON_False   (1 << 0)

Definition at line 90 of file cJSON.h.

◆ cJSON_Invalid

#define cJSON_Invalid   (0)

Definition at line 89 of file cJSON.h.

◆ cJSON_IsReference

#define cJSON_IsReference   256

Definition at line 99 of file cJSON.h.

◆ CJSON_NESTING_LIMIT

#define CJSON_NESTING_LIMIT   1000

Definition at line 137 of file cJSON.h.

◆ cJSON_NULL

#define cJSON_NULL   (1 << 2)

Definition at line 92 of file cJSON.h.

◆ cJSON_Number

#define cJSON_Number   (1 << 3)

Definition at line 93 of file cJSON.h.

◆ cJSON_Object

#define cJSON_Object   (1 << 6)

Definition at line 96 of file cJSON.h.

◆ CJSON_PUBLIC

#define CJSON_PUBLIC ( type)
Value:
type

Definition at line 77 of file cJSON.h.

Referenced by CJSON_PUBLIC(), CJSON_PUBLIC(), CJSON_PUBLIC(), CJSON_PUBLIC(), CJSON_PUBLIC(), and CJSON_PUBLIC().

◆ cJSON_Raw

#define cJSON_Raw   (1 << 7)

Definition at line 97 of file cJSON.h.

◆ cJSON_SetBoolValue

#define cJSON_SetBoolValue ( object,
boolValue )
Value:
( \
(object != NULL && ((object)->type & (cJSON_False|cJSON_True))) ? \
(object)->type=((object)->type &(~(cJSON_False|cJSON_True)))|((boolValue)?cJSON_True:cJSON_False) : \
)
#define cJSON_False
Definition cJSON.h:90
#define cJSON_Invalid
Definition cJSON.h:89
#define cJSON_True
Definition cJSON.h:91

Definition at line 289 of file cJSON.h.

◆ cJSON_SetIntValue

#define cJSON_SetIntValue ( object,
number )
Value:
((object) ? (object)->valueint = (object)->valuedouble = (number) : (number))
const char *const const double number
Definition cJSON.h:274

Definition at line 281 of file cJSON.h.

◆ cJSON_SetNumberValue

#define cJSON_SetNumberValue ( object,
number )
Value:
((object != NULL) ? cJSON_SetNumberHelper(object, (double)number) : (number))

Definition at line 284 of file cJSON.h.

◆ CJSON_STDCALL

#define CJSON_STDCALL

Definition at line 72 of file cJSON.h.

◆ cJSON_String

#define cJSON_String   (1 << 4)

Definition at line 94 of file cJSON.h.

◆ cJSON_StringIsConst

#define cJSON_StringIsConst   512

Definition at line 100 of file cJSON.h.

◆ cJSON_True

#define cJSON_True   (1 << 1)

Definition at line 91 of file cJSON.h.

◆ CJSON_VERSION_MAJOR

#define CJSON_VERSION_MAJOR   1

Definition at line 82 of file cJSON.h.

◆ CJSON_VERSION_MINOR

#define CJSON_VERSION_MINOR   7

Definition at line 83 of file cJSON.h.

◆ CJSON_VERSION_PATCH

#define CJSON_VERSION_PATCH   19

Definition at line 84 of file cJSON.h.

Typedef Documentation

◆ cJSON_bool

typedef int cJSON_bool

Definition at line 132 of file cJSON.h.

Function Documentation

◆ CJSON_PUBLIC() [1/7]

CJSON_PUBLIC ( char * ) const

References CJSON_PUBLIC, and item.

◆ CJSON_PUBLIC() [2/7]

CJSON_PUBLIC ( cJSON * ) const

References CJSON_PUBLIC.

◆ CJSON_PUBLIC() [3/7]

CJSON_PUBLIC ( cJSON_bool )

◆ CJSON_PUBLIC() [4/7]

CJSON_PUBLIC ( const char * )

References CJSON_PUBLIC.

◆ CJSON_PUBLIC() [5/7]

CJSON_PUBLIC ( double ) const

References CJSON_PUBLIC, item, and raw.

◆ CJSON_PUBLIC() [6/7]

CJSON_PUBLIC ( void * )

References CJSON_PUBLIC.

◆ CJSON_PUBLIC() [7/7]

CJSON_PUBLIC ( void )

References CJSON_PUBLIC.

Variable Documentation

◆ b

const cJSON* const b

Definition at line 261 of file cJSON.h.

◆ boolean

const char* const const cJSON_bool boolean

Definition at line 273 of file cJSON.h.

◆ buffer

char* buffer

Definition at line 169 of file cJSON.h.

◆ buffer_length

size_t buffer_length

Definition at line 155 of file cJSON.h.

◆ case_sensitive

const cJSON* const const cJSON_bool case_sensitive

Definition at line 261 of file cJSON.h.

◆ count

int count

Definition at line 222 of file cJSON.h.

◆ fmt

int cJSON_bool fmt

Definition at line 166 of file cJSON.h.

Referenced by lazybios_log_internal(), and lazybiosDecoderAppend().

◆ format

char const int const cJSON_bool format

Definition at line 169 of file cJSON.h.

◆ index

int index

Definition at line 176 of file cJSON.h.

Referenced by DMIString().

◆ item

cJSON *const item

Definition at line 228 of file cJSON.h.

Referenced by CJSON_PUBLIC(), and CJSON_PUBLIC().

◆ length

char const int length

Definition at line 169 of file cJSON.h.

Referenced by DMIString().

◆ name

const char *const name

Definition at line 270 of file cJSON.h.

◆ newitem

const char cJSON * newitem

Definition at line 248 of file cJSON.h.

◆ number

double number

Definition at line 274 of file cJSON.h.

◆ prebuffer

int prebuffer

Definition at line 166 of file cJSON.h.

◆ raw

const char* const const char* const raw

Definition at line 276 of file cJSON.h.

Referenced by CJSON_PUBLIC().

◆ recurse

cJSON_bool recurse

Definition at line 255 of file cJSON.h.

◆ replacement

cJSON* const cJSON* replacement

Definition at line 249 of file cJSON.h.

◆ require_null_terminated

size_t const char cJSON_bool require_null_terminated

Definition at line 158 of file cJSON.h.

◆ return_parse_end

size_t const char ** return_parse_end

Definition at line 158 of file cJSON.h.

◆ string

const char *const const char *const string

Definition at line 178 of file cJSON.h.

◆ valuestring

const char* valuestring

Definition at line 286 of file cJSON.h.

◆ which

int which

Definition at line 240 of file cJSON.h.