26 #include <pcl/pcl_macros.h>
40 #define cJSON_Number 3
41 #define cJSON_String 4
43 #define cJSON_Object 6
45 #define cJSON_IsReference 256
62 void *(*malloc_fn)(
size_t sz);
71 PCLAPI(
cJSON *) cJSON_Parse(const
char *value);
73 PCLAPI(
char *) cJSON_Print(
cJSON *item);
75 PCLAPI(
char *) cJSON_PrintUnformatted(
cJSON *item);
77 PCLAPI(
void) cJSON_Delete(
cJSON *c);
79 PCLAPI(
void) cJSON_PrintStr(
cJSON *item,
std::
string& s);
81 PCLAPI(
void) cJSON_PrintUnformattedStr(
cJSON *item,
std::
string& s);
84 PCLAPI(
int) cJSON_GetArraySize(
cJSON *array);
86 PCLAPI(
cJSON *) cJSON_GetArrayItem(
cJSON *array,
int item);
88 PCLAPI(
cJSON *) cJSON_GetObjectItem(
cJSON *
object,const
char *
string);
91 PCLAPI(const
char *) cJSON_GetErrorPtr();
94 PCLAPI(
cJSON *) cJSON_CreateNull();
95 PCLAPI(
cJSON *) cJSON_CreateTrue();
96 PCLAPI(
cJSON *) cJSON_CreateFalse();
97 PCLAPI(
cJSON *) cJSON_CreateBool(
int b);
98 PCLAPI(
cJSON *) cJSON_CreateNumber(
double num);
99 PCLAPI(
cJSON *) cJSON_CreateString(const
char *
string);
100 PCLAPI(
cJSON *) cJSON_CreateArray();
101 PCLAPI(
cJSON *) cJSON_CreateObject();
104 PCLAPI(
cJSON *) cJSON_CreateIntArray(
int *numbers,
int count);
105 PCLAPI(
cJSON *) cJSON_CreateFloatArray(
float *numbers,
int count);
106 PCLAPI(
cJSON *) cJSON_CreateDoubleArray(
double *numbers,
int count);
107 PCLAPI(
cJSON *) cJSON_CreateStringArray(const
char **strings,
int count);
110 PCLAPI(
void) cJSON_AddItemToArray(
cJSON *array,
cJSON *item);
111 PCLAPI(
void) cJSON_AddItemToObject(
cJSON *
object,const
char *
string,
cJSON *item);
113 PCLAPI(
void) cJSON_AddItemReferenceToArray(
cJSON *array,
cJSON *item);
114 PCLAPI(
void) cJSON_AddItemReferenceToObject(
cJSON *
object,const
char *
string,
cJSON *item);
117 PCLAPI(
cJSON *) cJSON_DetachItemFromArray(
cJSON *array,
int which);
118 PCLAPI(
void) cJSON_DeleteItemFromArray(
cJSON *array,
int which);
119 PCLAPI(
cJSON *) cJSON_DetachItemFromObject(
cJSON *
object,const
char *
string);
120 PCLAPI(
void) cJSON_DeleteItemFromObject(
cJSON *
object,const
char *
string);
123 PCLAPI(
void) cJSON_ReplaceItemInArray(
cJSON *array,
int which,
cJSON *newitem);
124 PCLAPI(
void) cJSON_ReplaceItemInObject(
cJSON *
object,const
char *
string,
cJSON *newitem);
126 #define cJSON_AddNullToObject(object,name) cJSON_AddItemToObject(object, name, cJSON_CreateNull())
127 #define cJSON_AddTrueToObject(object,name) cJSON_AddItemToObject(object, name, cJSON_CreateTrue())
128 #define cJSON_AddFalseToObject(object,name) cJSON_AddItemToObject(object, name, cJSON_CreateFalse())
129 #define cJSON_AddNumberToObject(object,name,n) cJSON_AddItemToObject(object, name, cJSON_CreateNumber(n))
130 #define cJSON_AddStringToObject(object,name,s) cJSON_AddItemToObject(object, name, cJSON_CreateString(s))
void(* free_fn)(void *ptr)