31#if !defined(__WINDOWS__) && \
32 (defined(WIN32) || defined(WIN64) || defined(_MSC_VER) || defined(_WIN32))
59#define CJSON_CDECL __cdecl
60#define CJSON_STDCALL __stdcall
63#if !defined(CJSON_HIDE_SYMBOLS) && !defined(CJSON_IMPORT_SYMBOLS) && !defined(CJSON_EXPORT_SYMBOLS)
64#define CJSON_EXPORT_SYMBOLS
67#if defined(CJSON_HIDE_SYMBOLS)
68#define CJSON_PUBLIC(type) type CJSON_STDCALL
69#elif defined(CJSON_EXPORT_SYMBOLS)
70#define CJSON_PUBLIC(type) __declspec(dllexport) type CJSON_STDCALL
71#elif defined(CJSON_IMPORT_SYMBOLS)
72#define CJSON_PUBLIC(type) __declspec(dllimport) type CJSON_STDCALL
78#if (defined(__GNUC__) || defined(__SUNPRO_CC) || defined(__SUNPRO_C)) && \
79 defined(CJSON_API_VISIBILITY)
80#define CJSON_PUBLIC(type) __attribute__((visibility("default"))) type
82#define CJSON_PUBLIC(type) type
87#define CJSON_VERSION_MAJOR 1
88#define CJSON_VERSION_MINOR 7
89#define CJSON_VERSION_PATCH 19
94#define cJSON_Invalid (0)
95#define cJSON_False (1 << 0)
96#define cJSON_True (1 << 1)
97#define cJSON_NULL (1 << 2)
98#define cJSON_Number (1 << 3)
99#define cJSON_String (1 << 4)
100#define cJSON_Array (1 << 5)
101#define cJSON_Object (1 << 6)
102#define cJSON_Raw (1 << 7)
104#define cJSON_IsReference 256
105#define cJSON_StringIsConst 512
145#ifndef CJSON_NESTING_LIMIT
146#define CJSON_NESTING_LIMIT 1000
151#ifndef CJSON_CIRCULAR_LIMIT
152#define CJSON_CIRCULAR_LIMIT 10000
177 const char **return_parse_end,
cJSON_bool require_null_terminated);
274 CJSON_PUBLIC(
void) cJSON_DeleteItemFromObject(
cJSON *
object, const
char *
string);
275 CJSON_PUBLIC(
void) cJSON_DeleteItemFromObjectCaseSensitive(
cJSON *
object, const
char *
string);
322#define cJSON_SetIntValue(object, number) \
323 ((object) ? (object)->valueint = (object)->valuedouble = (number) : (number))
326#define cJSON_SetNumberValue(object, number) \
327 ((object != NULL) ? cJSON_SetNumberHelper(object, (double)number) : (number))
334#define cJSON_SetBoolValue(object, boolValue) \
335 ((object != NULL && ((object)->type & (cJSON_False | cJSON_True))) \
336 ? (object)->type = ((object)->type & (~(cJSON_False | cJSON_True))) | \
337 ((boolValue) ? cJSON_True : cJSON_False) \
341#define cJSON_ArrayForEach(element, array) \
342 for (element = (array != NULL) ? (array)->child : NULL; element != NULL; \
343 element = element->next)
cJSON_AddItemToObjectCS(cJSON *object, const char *string, cJSON *item)
double number
Definition cJSON.h:325
cJSON_GetObjectItemCaseSensitive(const cJSON *const object, const char *const string)
Definition cJSON.c:2006
int prebuffer
Definition cJSON.h:185
cJSON_DetachItemFromObjectCaseSensitive(cJSON *object, const char *string)
cJSON_InsertItemInArray(cJSON *array, int which, cJSON *newitem)
const char *const name
Definition cJSON.h:307
cJSON_ParseWithLengthOpts(const char *value, size_t buffer_length, const char **return_parse_end, cJSON_bool require_null_terminated)
Definition cJSON.c:1159
cJSON_AddStringToObject(cJSON *const object, const char *const name, const char *const string)
Definition cJSON.c:2236
cJSON_PrintPreallocated(cJSON *item, char *buffer, const int length, const cJSON_bool format)
Definition cJSON.c:1365
cJSON_AddRawToObject(cJSON *const object, const char *const name, const char *const raw)
Definition cJSON.c:2249
#define CJSON_PUBLIC(type)
Definition cJSON.h:82
int index
Definition cJSON.h:198
#define CJSON_CDECL
Definition cJSON.h:75
size_t buffer_length
Definition cJSON.h:167
int which
Definition cJSON.h:269
cJSON_AddNumberToObject(cJSON *const object, const char *const name, const double number)
Definition cJSON.c:2223
const char * valuestring
Definition cJSON.h:330
int cJSON_bool fmt
Definition cJSON.h:185
cJSON_Compare(const cJSON *const a, const cJSON *const b, const cJSON_bool case_sensitive)
Definition cJSON.c:3124
cJSON_AddBoolToObject(cJSON *const object, const char *const name, const cJSON_bool boolean)
Definition cJSON.c:2210
cJSON * item
Definition cJSON.h:254
cJSON_ReplaceItemInObjectCaseSensitive(cJSON *object, const char *string, cJSON *newitem)
Definition cJSON.c:2488
int count
Definition cJSON.h:248
cJSON_ParseWithOpts(const char *value, const char **return_parse_end, cJSON_bool require_null_terminated)
Definition cJSON.c:1140
cJSON_AddItemReferenceToObject(cJSON *object, const char *string, cJSON *item)
Definition cJSON.c:2162
cJSON_ReplaceItemInObject(cJSON *object, const char *string, cJSON *newitem)
Definition cJSON.c:2482
int cJSON_bool
Definition cJSON.h:141
cJSON_ReplaceItemViaPointer(cJSON *const parent, cJSON *const item, cJSON *replacement)
Definition cJSON.c:2397
int cJSON * newitem
Definition cJSON.h:283
cJSON_bool recurse
Definition cJSON.h:290
void(CJSON_CDECL *free_fn)(void *ptr)
void *CJSON_CDECL * malloc_fn(size_t sz)
int valueint
Definition cJSON.h:124
struct cJSON * child
Definition cJSON.h:116
struct cJSON * prev
Definition cJSON.h:113
double valuedouble
Definition cJSON.h:126
char * string
Definition cJSON.h:130
int type
Definition cJSON.h:119
char * valuestring
Definition cJSON.h:122
struct cJSON * next
Definition cJSON.h:112