50 #define CJSON_VERSION_MAJOR 1
51 #define CJSON_VERSION_MINOR 7
52 #define CJSON_VERSION_PATCH 7
57 #define cJSON_Invalid (0)
58 #define cJSON_False (1 << 0)
59 #define cJSON_True (1 << 1)
60 #define cJSON_NULL (1 << 2)
61 #define cJSON_Number (1 << 3)
62 #define cJSON_String (1 << 4)
63 #define cJSON_Array (1 << 5)
64 #define cJSON_Object (1 << 6)
65 #define cJSON_Raw (1 << 7)
67 #define cJSON_IsReference 256
68 #define cJSON_StringIsConst 512
95 void *(*malloc_fn)(
size_t sz);
102 #if !defined(__WINDOWS__) && (defined(WIN32) || defined(WIN64) || defined(_MSC_VER) || defined(_WIN32))
126 #if !defined(CJSON_HIDE_SYMBOLS) && !defined(CJSON_IMPORT_SYMBOLS) && !defined(CJSON_EXPORT_SYMBOLS)
127 #define CJSON_EXPORT_SYMBOLS
130 #if defined(CJSON_HIDE_SYMBOLS)
131 #define CJSON_PUBLIC(type) type __stdcall
132 #elif defined(CJSON_EXPORT_SYMBOLS)
133 #define CJSON_PUBLIC(type) __declspec(dllexport) type __stdcall
134 #elif defined(CJSON_IMPORT_SYMBOLS)
135 #define CJSON_PUBLIC(type) __declspec(dllimport) type __stdcall
138 #if (defined(__GNUC__) || defined(__SUNPRO_CC) || defined (__SUNPRO_C)) && defined(CJSON_API_VISIBILITY)
139 #define CJSON_PUBLIC(type) __attribute__((visibility("default"))) type
141 #define CJSON_PUBLIC(type) type
147 #ifndef CJSON_NESTING_LIMIT
148 #define CJSON_NESTING_LIMIT 1000
184 CJSON_PUBLIC(
cJSON *)cJSON_GetObjectItemCaseSensitive(const
cJSON *const
object, const
char *const
string);
275 CJSON_PUBLIC(
void) cJSON_DeleteItemFromObject(
cJSON *
object, const
char *
string);
277 CJSON_PUBLIC(
void) cJSON_DeleteItemFromObjectCaseSensitive(
cJSON *
object, const
char *
string);
323 #define cJSON_SetIntValue(object, number) ((object) ? (object)->valueint = (object)->valuedouble = (number) : (number))
327 #define cJSON_SetNumberValue(object, number) ((object != NULL) ? cJSON_SetNumberHelper(object, (double)number) : (number))
330 #define cJSON_ArrayForEach(element, array) for(element = (array != NULL) ? (array)->child : NULL; element != NULL; element = element->next)