32 #define CJSON_VERSION_MAJOR 1
33 #define CJSON_VERSION_MINOR 7
34 #define CJSON_VERSION_PATCH 7
39 #define cJSON_Invalid (0)
40 #define cJSON_False (1 << 0)
41 #define cJSON_True (1 << 1)
42 #define cJSON_NULL (1 << 2)
43 #define cJSON_Number (1 << 3)
44 #define cJSON_String (1 << 4)
45 #define cJSON_Array (1 << 5)
46 #define cJSON_Object (1 << 6)
47 #define cJSON_Raw (1 << 7)
49 #define cJSON_IsReference 256
50 #define cJSON_StringIsConst 512
77 void *(*malloc_fn)(
size_t sz);
83 #if !defined(__WINDOWS__) && (defined(WIN32) || defined(WIN64) || defined(_MSC_VER) || defined(_WIN32))
107 #ifdef USE_IMPORT_EXPORT
108 #ifdef AWS_CORE_EXPORTS
109 #define CJSON_EXPORT_SYMBOLS
111 #define CJSON_IMPORT_SYMBOLS
112 #endif // AWS_CORE_EXPORTS
114 #define CJSON_HIDE_SYMBOLS
115 #endif // USE_IMPORT_EXPORT
118 #if !defined(CJSON_HIDE_SYMBOLS) && !defined(CJSON_IMPORT_SYMBOLS) && !defined(CJSON_EXPORT_SYMBOLS)
119 #define CJSON_EXPORT_SYMBOLS
122 #if defined(CJSON_HIDE_SYMBOLS)
123 #define CJSON_PUBLIC(type) type __stdcall
124 #elif defined(CJSON_EXPORT_SYMBOLS)
125 #define CJSON_PUBLIC(type) __declspec(dllexport) type __stdcall
126 #elif defined(CJSON_IMPORT_SYMBOLS)
127 #define CJSON_PUBLIC(type) __declspec(dllimport) type __stdcall
130 #if (defined(__GNUC__) || defined(__SUNPRO_CC) || defined (__SUNPRO_C)) && defined(CJSON_API_VISIBILITY)
131 #define CJSON_PUBLIC(type) __attribute__((visibility("default"))) type
133 #define CJSON_PUBLIC(type) type
139 #ifndef CJSON_NESTING_LIMIT
140 #define CJSON_NESTING_LIMIT 1000
174 CJSON_PUBLIC(
cJSON *) cJSON_GetObjectItemCaseSensitive(
const cJSON *
const object,
const char *
const string);
238 CJSON_PUBLIC(
void) cJSON_DeleteItemFromObject(
cJSON *
object,
const char *
string);
239 CJSON_PUBLIC(
void) cJSON_DeleteItemFromObjectCaseSensitive(
cJSON *
object,
const char *
string);
273 #define cJSON_SetIntValue(object, number) ((object) ? (object)->valueint = (object)->valuedouble = (number) : (number))
276 #define cJSON_SetNumberValue(object, number) ((object != NULL) ? cJSON_SetNumberHelper(object, (double)number) : (number))
279 #define cJSON_ArrayForEach(element, array) for(element = (array != NULL) ? (array)->child : NULL; element != NULL; element = element->next)