Lines Matching refs:value

446 static const char *parse_value(cJSON *item, const char *value, bool *out_of_memory);
448 static const char *parse_array(cJSON *item, const char *value, bool *out_of_memory);
450 static const char *parse_object(cJSON *item, const char *value, bool *out_of_memory);
460 static cJSON *cJSON_ParseWithOpts(const VkAllocationCallbacks *pAllocator, const char *value, const char **return_parse_end,
470 end = parse_value(c, skip(value), out_of_memory);
490 static cJSON *cJSON_Parse(const VkAllocationCallbacks *pAllocator, const char *value, bool *out_of_memory) {
491 return cJSON_ParseWithOpts(pAllocator, value, 0, 0, out_of_memory);
499 static const char *parse_value(cJSON *item, const char *value, bool *out_of_memory) {
500 if (!value) return 0; /* Fail on null. */
501 if (!strncmp(value, "null", 4)) {
503 return value + 4;
505 if (!strncmp(value, "false", 5)) {
507 return value + 5;
509 if (!strncmp(value, "true", 4)) {
512 return value + 4;
514 if (*value == '\"') {
515 return parse_string(item, value, out_of_memory);
517 if (*value == '-' || (*value >= '0' && *value <= '9')) {
518 return parse_number(item, value);
520 if (*value == '[') {
521 return parse_array(item, value, out_of_memory);
523 if (*value == '{') {
524 return parse_object(item, value, out_of_memory);
527 // ep = value; // commented out as it is unused
531 /* Render a value to text. */
594 static const char *parse_array(cJSON *item, const char *value, bool *out_of_memory) {
596 if (*value != '[') {
597 // ep = value; // commented out as it is unused
602 value = skip(value + 1);
603 if (*value == ']') return value + 1; /* empty array. */
610 value = skip(parse_value(child, skip(value), out_of_memory)); /* skip any spacing, get the value. */
611 if (!value) return 0;
613 while (*value == ',') {
623 value = skip(parse_value(child, skip(value + 1), out_of_memory));
624 if (!value) return 0; /* memory fail */
627 if (*value == ']') return value + 1; /* end of array */
628 // ep = value; // commented out as it is unused
733 static const char *parse_object(cJSON *item, const char *value, bool *out_of_memory) {
735 if (*value != '{') {
736 // ep = value; // commented out as it is unused
741 value = skip(value + 1);
742 if (*value == '}') return value + 1; /* empty array. */
749 value = skip(parse_string(child, skip(value), out_of_memory));
750 if (!value) return 0;
753 if (*value != ':') {
754 // ep = value; // commented out as it is unused
757 value = skip(parse_value(child, skip(value + 1), out_of_memory)); /* skip any spacing, get the value. */
758 if (!value) return 0;
760 while (*value == ',') {
770 value = skip(parse_string(child, skip(value + 1), out_of_memory));
771 if (!value) return 0;
774 if (*value != ':') {
775 // ep = value; // commented out as it is unused
778 value = skip(parse_value(child, skip(value + 1), out_of_memory)); /* skip any spacing, get the value. */
779 if (!value) return 0;
782 if (*value == '}') return value + 1; /* end of array */
783 // ep = value; // commented out as it is unused