* Remove/Detach items from Arrays/Objects. */ĬJSON_PUBLIC(cJSON_bool) cJSON_AddItemReferenceToArray(cJSON *array, cJSON *item) ĬJSON_PUBLIC(cJSON_bool) cJSON_AddItemReferenceToObject(cJSON *object, const char *string, cJSON *item) Use this when you want to add an existing cJSON to a new cJSON, but don't want to corrupt your existing cJSON. * Append reference to item to the specified array/object. # define cJSON_False ( 1 type & cJSON_StringIsConst) is zero beforeĬJSON_PUBLIC(cJSON_bool) cJSON_AddItemToObjectCS(cJSON *object, const char *string, cJSON *item) # define CJSON_PUBLIC( type) _attribute_((visibility( "default "))) type # if (defined(_GNUC_) || defined(_SUNPRO_CC) || defined (_SUNPRO_C)) & defined(CJSON_API_VISIBILITY) # define CJSON_PUBLIC( type) _declspec(dllimport) type CJSON_STDCALL # define CJSON_PUBLIC( type) _declspec(dllexport) type CJSON_STDCALL # define CJSON_PUBLIC( type) type CJSON_STDCALL # if !defined(CJSON_HIDE_SYMBOLS) & !defined(CJSON_IMPORT_SYMBOLS) & !defined(CJSON_EXPORT_SYMBOLS) * export symbols by default, this is necessary for copy pasting the C and header file */ Then using the CJSON_API_VISIBILITY flag to "export" the same symbols the way CJSON_EXPORT_SYMBOLS does Setting default visibility to hidden by adding
For windows you have 3 define options:ĬJSON_HIDE_SYMBOLS - Define this in the case where you don't want to ever dllexport symbolsĬJSON_EXPORT_SYMBOLS - Define this on library build when you want to dllexport symbols (default)ĬJSON_IMPORT_SYMBOLS - Define this if you want to dllimport symbolįor *nix builds that support visibility attribute, you can define similar behavior by * When compiling for windows, we specify a specific calling convention to avoid issues where we are being called from a project with a different default calling convention.
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, IN NO EVENT SHALL THEĪUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,įITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR The above copyright notice and this permission notice shall be included inĪll copies or substantial portions of the Software. To use, copy, modify, merge, publish, distribute, sublicense, and/or sellĬopies of the Software, and to permit persons to whom the Software isįurnished to do so, subject to the following conditions: In the Software without restriction, including without limitation the rights
Of this software and associated documentation files (the "Software"), to deal
Permission is hereby granted, free of charge, to any person obtaining a copy Copyright (c) 2009-2017 Dave Gamble and cJSON contributors