Lines Matching defs:cJSON

33 /* cJSON Types: */
45 /* The cJSON structure: */
46 typedef struct cJSON {
47 struct cJSON *next, *prev; /* next/prev allow you to walk array/object
50 struct cJSON *child; /* An array or object item will have a child pointer
62 } cJSON;
69 /* Supply malloc, realloc and free functions to cJSON */
72 /* Supply a block of JSON, and this returns a cJSON object you can interrogate.
74 extern cJSON *cJSON_Parse(const char *value);
75 /* Render a cJSON entity to text for transfer/storage. Free the char* when
77 extern char *cJSON_Print(cJSON *item);
78 /* Render a cJSON entity to text for transfer/storage without any formatting.
80 extern char *cJSON_PrintUnformatted(cJSON *item);
81 /* Render a cJSON entity to text using a buffered strategy. prebuffer is a guess
84 extern char *cJSON_PrintBuffered(cJSON *item, int prebuffer, int fmt);
85 /* Delete a cJSON entity and all subentities. */
86 extern void cJSON_Delete(cJSON *c);
91 extern int cJSON_GetArraySize(cJSON *array);
94 extern cJSON *cJSON_GetArrayItem(cJSON *array, int item);
96 extern cJSON *cJSON_GetObjectItem(cJSON *object, const char *string);
103 /* These calls create a cJSON item of the appropriate type. */
104 extern cJSON *cJSON_CreateNull(void);
105 extern cJSON *cJSON_CreateTrue(void);
106 extern cJSON *cJSON_CreateFalse(void);
107 extern cJSON *cJSON_CreateBool(int b);
108 extern cJSON *cJSON_CreateNumber(double num);
109 extern cJSON *cJSON_CreateString(const char *string);
110 extern cJSON *cJSON_CreateArray(void);
111 extern cJSON *cJSON_CreateObject(void);
114 extern cJSON *cJSON_CreateIntArray(const int *numbers, int count);
115 extern cJSON *cJSON_CreateFloatArray(const float *numbers, int count);
116 extern cJSON *cJSON_CreateDoubleArray(const double *numbers, int count);
117 extern cJSON *cJSON_CreateStringArray(const char **strings, int count);
120 extern void cJSON_AddItemToArray(cJSON *array, cJSON *item);
121 extern void cJSON_AddItemToObject(cJSON *object, const char *string, cJSON *item);
122 extern void cJSON_AddItemToObjectCS(cJSON *object, const char *string,
123 cJSON *item); /* Use this when string is definitely const (i.e. a literal,
124 or as good as), and will definitely survive the cJSON
127 * want to add an existing cJSON to a new cJSON, but don't want to corrupt your
128 * existing cJSON. */
129 extern void cJSON_AddItemReferenceToArray(cJSON *array, cJSON *item);
130 extern void cJSON_AddItemReferenceToObject(cJSON *object, const char *string, cJSON *item);
133 extern cJSON *cJSON_DetachItemFromArray(cJSON *array, int which);
134 extern void cJSON_DeleteItemFromArray(cJSON *array, int which);
135 extern cJSON *cJSON_DetachItemFromObject(cJSON *object, const char *string);
136 extern void cJSON_DeleteItemFromObject(cJSON *object, const char *string);
139 extern void cJSON_InsertItemInArray(cJSON *array, int which, cJSON *newitem); /* Shifts pre-existing items to the right. */
140 extern void cJSON_ReplaceItemInArray(cJSON *array, int which, cJSON *newitem);
141 extern void cJSON_ReplaceItemInObject(cJSON *object, const char *string, cJSON *newitem);
143 /* Duplicate a cJSON item */
144 extern cJSON *cJSON_Duplicate(cJSON *item, int recurse);
145 /* Duplicate will create a new, identical cJSON item to the one you pass, in new
153 extern cJSON *cJSON_ParseWithOpts(const char *value, const char **return_parse_end, int require_null_terminated);