Go to the documentation of this file.
27 #if !defined(_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER)
28 #define _CRT_SECURE_NO_DEPRECATE
32 #pragma GCC visibility push(default)
37 #pragma warning(disable : 4001)
56 #pragma GCC visibility pop
65 #define true ((cJSON_bool)1)
70 #define false ((cJSON_bool)0)
74 #define isinf(d) (isnan((d - d)) && !isnan(d))
77 #define isnan(d) (d != d)
82 #define NAN sqrt(-1.0)
99 if (!cJSON_IsString(
item)) {
107 if (!cJSON_IsNumber(
item)) {
115 #if (CJSON_VERSION_MAJOR != 1) || (CJSON_VERSION_MINOR != 7) || \
116 (CJSON_VERSION_PATCH != 17)
117 #error cJSON.h and cJSON.c have different versions. Make sure that both have the same.
130 const unsigned char *string2) {
131 if ((string1 ==
NULL) || (string2 ==
NULL)) {
135 if (string1 == string2) {
139 for (; tolower(*string1) == tolower(*string2); (
void)string1++, string2++) {
140 if (*string1 ==
'\0') {
145 return tolower(*string1) - tolower(*string2);
154 #if defined(_MSC_VER)
162 #define internal_malloc malloc
163 #define internal_free free
164 #define internal_realloc realloc
168 #define static_strlen(string_literal) (sizeof(string_literal) - sizeof(""))
176 unsigned char *copy =
NULL;
178 if (
string ==
NULL) {
182 length = strlen((
const char *)
string) +
sizeof(
"");
187 memcpy(copy,
string,
length);
207 if (hooks->free_fn !=
NULL) {
223 memset(node,
'\0',
sizeof(
cJSON));
250 #ifdef ENABLE_LOCALES
251 struct lconv *lconv = localeconv();
252 return (
unsigned char)lconv->decimal_point[0];
268 #define can_read(buffer, size) \
269 ((buffer != NULL) && (((buffer)->offset + size) <= (buffer)->length))
271 #define can_access_at_index(buffer, index) \
272 ((buffer != NULL) && (((buffer)->offset + index) < (buffer)->length))
273 #define cannot_access_at_index(buffer, index) \
274 (!can_access_at_index(buffer, index))
276 #define buffer_at_offset(buffer) ((buffer)->content + (buffer)->offset)
282 unsigned char *after_end =
NULL;
283 unsigned char number_c_string[64];
294 for (
i = 0; (
i < (
sizeof(number_c_string) - 1)) &&
316 number_c_string[
i] = decimal_point;
324 number_c_string[
i] =
'\0';
326 number = strtod((
const char *)number_c_string, (
char **)&after_end);
327 if (number_c_string == after_end) {
336 }
else if (
number <= (
double)INT_MIN) {
344 input_buffer->
offset += (size_t)(after_end - number_c_string);
351 object->valueint = INT_MAX;
352 }
else if (
number <= (
double)INT_MIN) {
353 object->valueint = INT_MIN;
355 object->valueint = (int)
number;
358 return object->valuedouble =
number;
370 if (object->valuestring ==
NULL) {
373 if (strlen(valuestring) <= strlen(object->valuestring)) {
374 strcpy(object->valuestring, valuestring);
375 return object->valuestring;
382 if (object->valuestring !=
NULL) {
383 cJSON_free(object->valuestring);
385 object->valuestring = copy;
402 unsigned char *newbuffer =
NULL;
409 if ((
p->length > 0) && (
p->offset >=
p->length)) {
414 if (needed > INT_MAX) {
419 needed +=
p->offset + 1;
420 if (needed <= p->
length) {
421 return p->buffer +
p->offset;
429 if (needed > (INT_MAX / 2)) {
431 if (needed <= INT_MAX) {
437 newsize = needed * 2;
440 if (
p->hooks.reallocate !=
NULL) {
442 newbuffer = (
unsigned char *)
p->hooks.reallocate(
p->buffer, newsize);
443 if (newbuffer ==
NULL) {
444 p->hooks.deallocate(
p->buffer);
452 newbuffer = (
unsigned char *)
p->hooks.allocate(newsize);
454 p->hooks.deallocate(
p->buffer);
461 memcpy(newbuffer,
p->buffer,
p->offset + 1);
462 p->hooks.deallocate(
p->buffer);
465 p->buffer = newbuffer;
467 return newbuffer +
p->offset;
472 const unsigned char *buffer_pointer =
NULL;
478 buffer->offset += strlen((
const char *)buffer_pointer);
483 double maxVal = fabs(
a) > fabs(
b) ? fabs(
a) : fabs(
b);
484 return (fabs(
a -
b) <= maxVal * DBL_EPSILON);
490 unsigned char *output_pointer =
NULL;
494 unsigned char number_buffer[26] = {
499 if (output_buffer ==
NULL) {
505 length = sprintf((
char *)number_buffer,
"null");
510 length = sprintf((
char *)number_buffer,
"%1.15g",
d);
513 if ((sscanf((
char *)number_buffer,
"%lg", &
test) != 1) ||
516 length = sprintf((
char *)number_buffer,
"%1.17g",
d);
521 if ((
length < 0) || (
length > (
int)(
sizeof(number_buffer) - 1))) {
526 output_pointer =
ensure(output_buffer, (
size_t)
length +
sizeof(
""));
527 if (output_pointer ==
NULL) {
534 if (number_buffer[
i] == decimal_point) {
535 output_pointer[
i] =
'.';
539 output_pointer[
i] = number_buffer[
i];
541 output_pointer[
i] =
'\0';
553 for (
i = 0;
i < 4;
i++) {
556 h += (
unsigned int)
input[
i] -
'0';
558 h += (
unsigned int)10 +
input[
i] -
'A';
560 h += (
unsigned int)10 +
input[
i] -
'a';
579 const unsigned char *
const input_end,
580 unsigned char **output_pointer) {
581 long unsigned int codepoint = 0;
582 unsigned int first_code = 0;
583 const unsigned char *first_sequence = input_pointer;
584 unsigned char utf8_length = 0;
585 unsigned char utf8_position = 0;
586 unsigned char sequence_length = 0;
587 unsigned char first_byte_mark = 0;
589 if ((input_end - first_sequence) < 6) {
598 if (((first_code >= 0xDC00) && (first_code <= 0xDFFF))) {
603 if ((first_code >= 0xD800) && (first_code <= 0xDBFF)) {
604 const unsigned char *second_sequence = first_sequence + 6;
605 unsigned int second_code = 0;
606 sequence_length = 12;
608 if ((input_end - second_sequence) < 6) {
613 if ((second_sequence[0] !=
'\\') || (second_sequence[1] !=
'u')) {
619 second_code =
parse_hex4(second_sequence + 2);
621 if ((second_code < 0xDC00) || (second_code > 0xDFFF)) {
628 0x10000 + (((first_code & 0x3FF) << 10) | (second_code & 0x3FF));
631 codepoint = first_code;
637 if (codepoint < 0x80) {
640 }
else if (codepoint < 0x800) {
643 first_byte_mark = 0xC0;
644 }
else if (codepoint < 0x10000) {
647 first_byte_mark = 0xE0;
648 }
else if (codepoint <= 0x10FFFF) {
651 first_byte_mark = 0xF0;
658 for (utf8_position = (
unsigned char)(utf8_length - 1); utf8_position > 0;
661 (*output_pointer)[utf8_position] =
662 (
unsigned char)((codepoint | 0x80) & 0xBF);
666 if (utf8_length > 1) {
667 (*output_pointer)[0] =
668 (
unsigned char)((codepoint | first_byte_mark) & 0xFF);
670 (*output_pointer)[0] = (
unsigned char)(codepoint & 0x7F);
673 *output_pointer += utf8_length;
675 return sequence_length;
686 unsigned char *output_pointer =
NULL;
696 size_t allocation_length = 0;
697 size_t skipped_bytes = 0;
698 while (((
size_t)(input_end - input_buffer->
content) <
700 (*input_end !=
'\"')) {
702 if (input_end[0] ==
'\\') {
703 if ((
size_t)(input_end + 1 - input_buffer->
content) >=
713 if (((
size_t)(input_end - input_buffer->
content) >=
715 (*input_end !=
'\"')) {
724 allocation_length +
sizeof(
""));
732 while (input_pointer < input_end) {
733 if (*input_pointer !=
'\\') {
734 *output_pointer++ = *input_pointer++;
738 unsigned char sequence_length = 2;
739 if ((input_end - input_pointer) < 1) {
743 switch (input_pointer[1]) {
745 *output_pointer++ =
'\b';
748 *output_pointer++ =
'\f';
751 *output_pointer++ =
'\n';
754 *output_pointer++ =
'\r';
757 *output_pointer++ =
'\t';
762 *output_pointer++ = input_pointer[1];
768 input_pointer, input_end, &output_pointer);
769 if (sequence_length == 0) {
778 input_pointer += sequence_length;
783 *output_pointer =
'\0';
788 input_buffer->
offset = (size_t)(input_end - input_buffer->
content);
798 if (input_pointer !=
NULL) {
799 input_buffer->
offset = (size_t)(input_pointer - input_buffer->
content);
808 const unsigned char *input_pointer =
NULL;
810 unsigned char *output_pointer =
NULL;
811 size_t output_length = 0;
813 size_t escape_characters = 0;
815 if (output_buffer ==
NULL) {
825 strcpy((
char *)
output,
"\"\"");
831 for (input_pointer =
input; *input_pointer; input_pointer++) {
832 switch (*input_pointer) {
844 if (*input_pointer < 32) {
846 escape_characters += 5;
851 output_length = (size_t)(input_pointer -
input) + escape_characters;
853 output =
ensure(output_buffer, output_length +
sizeof(
"\"\""));
859 if (escape_characters == 0) {
862 output[output_length + 1] =
'\"';
863 output[output_length + 2] =
'\0';
869 output_pointer =
output + 1;
871 for (input_pointer =
input; *input_pointer !=
'\0';
872 (
void)input_pointer++, output_pointer++) {
873 if ((*input_pointer > 31) && (*input_pointer !=
'\"') &&
874 (*input_pointer !=
'\\')) {
876 *output_pointer = *input_pointer;
879 *output_pointer++ =
'\\';
880 switch (*input_pointer) {
882 *output_pointer =
'\\';
885 *output_pointer =
'\"';
888 *output_pointer =
'b';
891 *output_pointer =
'f';
894 *output_pointer =
'n';
897 *output_pointer =
'r';
900 *output_pointer =
't';
904 sprintf((
char *)output_pointer,
"u%04x", *input_pointer);
910 output[output_length + 1] =
'\"';
911 output[output_length + 2] =
'\0';
976 size_t buffer_length;
983 buffer_length = strlen(
value) +
sizeof(
"");
986 require_null_terminated);
992 const char **return_parse_end,
1001 if (
value ==
NULL || 0 == buffer_length) {
1022 if (require_null_terminated) {
1029 if (return_parse_end) {
1042 local_error.
json = (
const unsigned char *)
value;
1051 if (return_parse_end !=
NULL) {
1072 #define cjson_min(a, b) (((a) < (b)) ? (a) : (b))
1076 static const size_t default_buffer_size = 256;
1078 unsigned char *printed =
NULL;
1083 buffer->buffer = (
unsigned char *)hooks->
allocate(default_buffer_size);
1101 if (printed ==
NULL) {
1108 if (printed ==
NULL) {
1111 memcpy(printed,
buffer->buffer,
1113 printed[
buffer->offset] =
'\0';
1116 hooks->deallocate(
buffer->buffer);
1123 hooks->deallocate(
buffer->buffer);
1126 if (printed !=
NULL) {
1127 hooks->deallocate(printed);
1146 if (prebuffer < 0) {
1155 p.length = (size_t)prebuffer;
1166 return (
char *)
p.buffer;
1178 p.buffer = (
unsigned char *)
buffer;
1201 input_buffer->
offset += 4;
1209 input_buffer->
offset += 5;
1218 input_buffer->
offset += 4;
1262 strcpy((
char *)
output,
"null");
1270 strcpy((
char *)
output,
"false");
1278 strcpy((
char *)
output,
"true");
1285 size_t raw_length = 0;
1322 input_buffer->
depth++;
1349 if (new_item ==
NULL) {
1356 current_item = head = new_item;
1359 current_item->
next = new_item;
1360 new_item->
prev = current_item;
1361 current_item = new_item;
1380 input_buffer->
depth--;
1383 head->
prev = current_item;
1404 unsigned char *output_pointer =
NULL;
1408 if (output_buffer ==
NULL) {
1414 output_pointer =
ensure(output_buffer, 1);
1415 if (output_pointer ==
NULL) {
1419 *output_pointer =
'[';
1421 output_buffer->
depth++;
1423 while (current_element !=
NULL) {
1424 if (!
print_value(current_element, output_buffer)) {
1428 if (current_element->
next) {
1431 if (output_pointer ==
NULL) {
1434 *output_pointer++ =
',';
1435 if (output_buffer->
format) {
1436 *output_pointer++ =
' ';
1438 *output_pointer =
'\0';
1441 current_element = current_element->
next;
1444 output_pointer =
ensure(output_buffer, 2);
1445 if (output_pointer ==
NULL) {
1448 *output_pointer++ =
']';
1449 *output_pointer =
'\0';
1450 output_buffer->
depth--;
1464 input_buffer->
depth++;
1490 if (new_item ==
NULL) {
1497 current_item = head = new_item;
1500 current_item->
next = new_item;
1501 new_item->
prev = current_item;
1502 current_item = new_item;
1538 input_buffer->
depth--;
1541 head->
prev = current_item;
1561 unsigned char *output_pointer =
NULL;
1565 if (output_buffer ==
NULL) {
1572 if (output_pointer ==
NULL) {
1576 *output_pointer++ =
'{';
1577 output_buffer->
depth++;
1578 if (output_buffer->
format) {
1579 *output_pointer++ =
'\n';
1583 while (current_item) {
1584 if (output_buffer->
format) {
1586 output_pointer =
ensure(output_buffer, output_buffer->
depth);
1587 if (output_pointer ==
NULL) {
1590 for (
i = 0;
i < output_buffer->
depth;
i++) {
1591 *output_pointer++ =
'\t';
1605 if (output_pointer ==
NULL) {
1608 *output_pointer++ =
':';
1609 if (output_buffer->
format) {
1610 *output_pointer++ =
'\t';
1622 (size_t)(current_item->
next ? 1 : 0));
1624 if (output_pointer ==
NULL) {
1627 if (current_item->
next) {
1628 *output_pointer++ =
',';
1631 if (output_buffer->
format) {
1632 *output_pointer++ =
'\n';
1634 *output_pointer =
'\0';
1637 current_item = current_item->
next;
1641 output_buffer, output_buffer->
format ? (output_buffer->
depth + 1) : 2);
1642 if (output_pointer ==
NULL) {
1645 if (output_buffer->
format) {
1647 for (
i = 0;
i < (output_buffer->
depth - 1);
i++) {
1648 *output_pointer++ =
'\t';
1651 *output_pointer++ =
'}';
1652 *output_pointer =
'\0';
1653 output_buffer->
depth--;
1686 current_child =
array->child;
1687 while ((current_child !=
NULL) && (
index > 0)) {
1689 current_child = current_child->
next;
1692 return current_child;
1711 current_element =
object->
child;
1712 if (case_sensitive) {
1713 while ((current_element !=
NULL) && (current_element->
string !=
NULL) &&
1714 (strcmp(
name, current_element->
string) != 0)) {
1715 current_element = current_element->
next;
1718 while ((current_element !=
NULL) &&
1720 (
const unsigned char *)
name,
1721 (
const unsigned char *)(current_element->
string)) != 0)) {
1722 current_element = current_element->
next;
1726 if ((current_element ==
NULL) || (current_element->
string ==
NULL)) {
1730 return current_element;
1764 if (reference ==
NULL) {
1807 #if defined(__clang__) || \
1808 (defined(__GNUC__) && \
1809 ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))))
1810 #pragma GCC diagnostic push
1813 #pragma GCC diagnostic ignored "-Wcast-qual"
1817 #if defined(__clang__) || \
1818 (defined(__GNUC__) && \
1819 ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))))
1820 #pragma GCC diagnostic pop
1824 const char *
const string,
1828 char *new_key =
NULL;
1841 if (new_key ==
NULL) {
1880 if ((
object ==
NULL) || (
string ==
NULL)) {
1891 cJSON *
null = cJSON_CreateNull();
1902 cJSON *true_item = cJSON_CreateTrue();
1907 cJSON_Delete(true_item);
1913 cJSON *false_item = cJSON_CreateFalse();
1918 cJSON_Delete(false_item);
1925 cJSON *bool_item = cJSON_CreateBool(
boolean);
1930 cJSON_Delete(bool_item);
1942 cJSON_Delete(number_item);
1949 cJSON *string_item = cJSON_CreateString(
string);
1954 cJSON_Delete(string_item);
1961 cJSON *raw_item = cJSON_CreateRaw(raw);
1966 cJSON_Delete(raw_item);
1972 cJSON *object_item = cJSON_CreateObject();
1977 cJSON_Delete(object_item);
1988 cJSON_Delete(
array);
2032 cJSON_Delete(cJSON_DetachItemFromArray(
array,
which));
2069 if (after_inserted ==
NULL) {
2073 if (after_inserted !=
array->child && after_inserted->
prev ==
NULL) {
2078 newitem->next = after_inserted;
2079 newitem->
prev = after_inserted->
prev;
2080 after_inserted->
prev = newitem;
2081 if (after_inserted ==
array->child) {
2082 array->child = newitem;
2084 newitem->prev->next = newitem;
2091 cJSON *replacement) {
2092 if ((parent ==
NULL) || (parent->child ==
NULL) || (replacement ==
NULL) ||
2097 if (replacement ==
item) {
2104 if (replacement->next !=
NULL) {
2105 replacement->
next->
prev = replacement;
2107 if (parent->child ==
item) {
2108 if (parent->child->prev == parent->child) {
2109 replacement->
prev = replacement;
2111 parent->
child = replacement;
2116 if (replacement->prev !=
NULL) {
2117 replacement->
prev->
next = replacement;
2119 if (replacement->next ==
NULL) {
2144 if ((replacement ==
NULL) || (
string ==
NULL)) {
2151 cJSON_free(replacement->
string);
2162 object,
get_object_item(
object,
string, case_sensitive), replacement);
2220 if (num >= INT_MAX) {
2222 }
else if (num <= (
double)INT_MIN) {
2321 a = cJSON_CreateArray();
2323 for (
i = 0;
a && (
i < (size_t)
count);
i++) {
2324 n = cJSON_CreateNumber(numbers[
i]);
2337 if (
a &&
a->child) {
2354 a = cJSON_CreateArray();
2356 for (
i = 0;
a && (
i < (size_t)
count);
i++) {
2357 n = cJSON_CreateNumber((
double)numbers[
i]);
2370 if (
a &&
a->child) {
2388 a = cJSON_CreateArray();
2390 for (
i = 0;
a && (
i < (size_t)
count);
i++) {
2391 n = cJSON_CreateNumber(numbers[
i]);
2404 if (
a &&
a->child) {
2422 a = cJSON_CreateArray();
2424 for (
i = 0;
a && (
i < (size_t)
count);
i++) {
2438 if (
a &&
a->child) {
2489 newchild = cJSON_Duplicate(
2497 next->next = newchild;
2502 newitem->
child = newchild;
2507 if (newitem && newitem->
child) {
2514 if (newitem !=
NULL) {
2515 cJSON_Delete(newitem);
2524 for (; (*input)[0] !=
'\0'; ++(*input)) {
2525 if ((*
input)[0] ==
'\n') {
2535 for (; (*input)[0] !=
'\0'; ++(*input)) {
2536 if (((*
input)[0] ==
'*') && ((*
input)[1] ==
'/')) {
2544 (*output)[0] = (*input)[0];
2548 for (; (*input)[0] !=
'\0'; (
void)++(*
input), ++(*output)) {
2549 (*output)[0] = (*input)[0];
2551 if ((*
input)[0] ==
'\"') {
2552 (*output)[0] =
'\"';
2556 }
else if (((*
input)[0] ==
'\\') && ((*
input)[1] ==
'\"')) {
2557 (*output)[1] = (*input)[1];
2571 while (json[0] !=
'\0') {
2581 if (json[1] ==
'/') {
2583 }
else if (json[1] ==
'*') {
2687 if ((
a ==
NULL) || (
b ==
NULL) || ((
a->type & 0xFF) != (
b->type & 0xFF))) {
2692 switch (
a->type & 0xFF) {
2712 switch (
a->type & 0xFF) {
2727 if ((
a->valuestring ==
NULL) || (
b->valuestring ==
NULL)) {
2730 if (strcmp(
a->valuestring,
b->valuestring) == 0) {
2740 for (; (a_element !=
NULL) && (b_element !=
NULL);) {
2745 a_element = a_element->
next;
2746 b_element = b_element->
next;
2750 if (a_element != b_element) {
2763 if (b_element ==
NULL) {
2776 if (a_element ==
NULL) {
const unsigned char * json
CJSON_PUBLIC(const char *)
GLuint const GLchar * name
cJSON_AddObjectToObject(cJSON *const object, const char *const name)
static void update_offset(printbuffer *const buffer)
cJSON_AddNullToObject(cJSON *const object, const char *const name)
void(CJSON_CDECL *deallocate)(void *pointer)
cJSON_ParseWithLengthOpts(const char *value, size_t buffer_length, const char **return_parse_end, cJSON_bool require_null_terminated)
GLenum GLuint GLenum GLsizei length
static cJSON_bool compare_double(double a, double b)
cJSON_AddItemReferenceToObject(cJSON *object, const char *string, cJSON *item)
GLsizei const GLchar *const * strings
static void skip_oneline_comment(char **input)
GLsizei const GLchar *const * string
static unsigned char * cJSON_strdup(const unsigned char *string, const internal_hooks *const hooks)
#define cJSON_IsReference
cJSON_AddRawToObject(cJSON *const object, const char *const name, const char *const raw)
#define cJSON_ArrayForEach(element, array)
static cJSON_bool print_array(const cJSON *const item, printbuffer *const output_buffer)
cJSON_CreateStringArray(const char *const *strings, int count)
static unsigned char utf16_literal_to_utf8(const unsigned char *const input_pointer, const unsigned char *const input_end, unsigned char **output_pointer)
cJSON_DetachItemFromObject(cJSON *object, const char *string)
cJSON_AddItemToObject(cJSON *object, const char *string, cJSON *item)
GLboolean GLboolean GLboolean b
#define CJSON_VERSION_MINOR
cJSON_GetObjectItemCaseSensitive(const cJSON *const object, const char *const string)
static cJSON_bool replace_item_in_object(cJSON *object, const char *string, cJSON *replacement, cJSON_bool case_sensitive)
static cJSON * get_object_item(const cJSON *const object, const char *const name, const cJSON_bool case_sensitive)
static unsigned char * ensure(printbuffer *const p, size_t needed)
void *CJSON_CDECL * malloc_fn(size_t sz)
static error global_error
static void skip_multiline_comment(char **input)
cJSON_ReplaceItemInObjectCaseSensitive(cJSON *object, const char *string, cJSON *newitem)
static cJSON_bool print_object(const cJSON *const item, printbuffer *const output_buffer)
struct internal_hooks internal_hooks
cJSON_DetachItemViaPointer(cJSON *parent, cJSON *const item)
cJSON_AddTrueToObject(cJSON *const object, const char *const name)
cJSON_DeleteItemFromObject(cJSON *object, const char *string)
static cJSON_bool add_item_to_object(cJSON *const object, const char *const string, cJSON *const item, const internal_hooks *const hooks, const cJSON_bool constant_key)
cJSON_AddItemToObjectCS(cJSON *object, const char *string, cJSON *item)
#define buffer_at_offset(buffer)
cJSON_ReplaceItemViaPointer(cJSON *const parent, cJSON *const item, cJSON *replacement)
GLint GLint GLsizei GLint GLenum format
cJSON_DeleteItemFromObjectCaseSensitive(cJSON *object, const char *string)
static cJSON_bool parse_number(cJSON *const item, parse_buffer *const input_buffer)
GTEST_API_ const char * fmt
#define static_strlen(string_literal)
cJSON_Compare(const cJSON *const a, const cJSON *const b, const cJSON_bool case_sensitive)
#define can_read(buffer, size)
static cJSON_bool add_item_to_array(cJSON *array, cJSON *item)
static cJSON_bool parse_value(cJSON *const item, parse_buffer *const input_buffer)
static void * cast_away_const(const void *string)
cJSON_DetachItemFromObjectCaseSensitive(cJSON *object, const char *string)
static cJSON * get_array_item(const cJSON *array, size_t index)
cJSON_GetObjectItem(const cJSON *const object, const char *const string)
cJSON_InsertItemInArray(cJSON *array, int which, cJSON *newitem)
static cJSON * cJSON_New_Item(const internal_hooks *const hooks)
static int case_insensitive_strcmp(const unsigned char *string1, const unsigned char *string2)
void *CJSON_CDECL * reallocate(void *pointer, size_t size)
void *CJSON_CDECL * allocate(size_t size)
typedef void(APIENTRY *GLDEBUGPROCARB)(GLenum source
static cJSON * create_reference(const cJSON *item, const internal_hooks *const hooks)
static cJSON_bool parse_string(cJSON *const item, parse_buffer *const input_buffer)
cJSON_ReplaceItemInArray(cJSON *array, int which, cJSON *newitem)
static parse_buffer * skip_utf8_bom(parse_buffer *const buffer)
cJSON_AddBoolToObject(cJSON *const object, const char *const name, const cJSON_bool boolean)
static void minify_string(char **input, char **output)
#define cJSON_StringIsConst
#define cannot_access_at_index(buffer, index)
static unsigned char * print(const cJSON *const item, cJSON_bool format, const internal_hooks *const hooks)
cJSON_SetValuestring(cJSON *object, const char *valuestring)
#define CJSON_NESTING_LIMIT
static unsigned parse_hex4(const unsigned char *const input)
cJSON_HasObjectItem(const cJSON *object, const char *string)
cJSON_AddItemReferenceToArray(cJSON *array, cJSON *item)
cJSON_AddFalseToObject(cJSON *const object, const char *const name)
cJSON_PrintPreallocated(cJSON *item, char *buffer, const int length, const cJSON_bool format)
static internal_hooks global_hooks
static cJSON_bool parse_array(cJSON *const item, parse_buffer *const input_buffer)
cJSON_AddStringToObject(cJSON *const object, const char *const name, const char *const string)
static cJSON_bool print_string(const cJSON *const item, printbuffer *const p)
cJSON_ParseWithLength(const char *value, size_t buffer_length)
const unsigned char * content
static unsigned char get_decimal_point(void)
static cJSON_bool print_value(const cJSON *const item, printbuffer *const output_buffer)
static size_t next(const upb_table *t, size_t i)
#define CJSON_VERSION_MAJOR
GLsizei const GLfloat * value
static void suffix_object(cJSON *prev, cJSON *item)
cJSON_AddArrayToObject(cJSON *const object, const char *const name)
const upb_json_parsermethod const upb_symtab upb_sink * output
#define can_access_at_index(buffer, index)
cJSON_PrintBuffered(const cJSON *item, int prebuffer, cJSON_bool fmt)
static cJSON_bool parse_object(cJSON *const item, parse_buffer *const input_buffer)
#define CJSON_VERSION_PATCH
GLboolean GLboolean GLboolean GLboolean a
static cJSON_bool print_number(const cJSON *const item, printbuffer *const output_buffer)
cJSON_AddNumberToObject(cJSON *const object, const char *const name, const double number)
static parse_buffer * buffer_skip_whitespace(parse_buffer *const buffer)
cJSON_ParseWithOpts(const char *value, const char **return_parse_end, cJSON_bool require_null_terminated)
cJSON_ReplaceItemInObject(cJSON *object, const char *string, cJSON *newitem)
cJSON_CreateDoubleArray(const double *numbers, int count)
GLfloat GLfloat GLfloat GLfloat h
static cJSON_bool print_string_ptr(const unsigned char *const input, printbuffer *const output_buffer)
PHP_PROTO_OBJECT_FREE_END PHP_PROTO_OBJECT_DTOR_END intern array
libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:48