MCPcopy Create free account
hub / github.com/acl-dev/acl / json_array

Function json_array

lib_acl/src/json/acl_json_parse.c:438–470  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

436}
437
438static const char *json_array(ACL_JSON *json, const char *data)
439{
440 ACL_JSON_NODE *array;
441
442 SKIP_SPACE(data);
443 if (*data == 0)
444 return data;
445
446 /* ����������� */
447 array = acl_json_node_alloc(json);
448 array->left_ch = '[';
449 array->right_ch = ']';
450 array->type = ACL_JSON_T_ARRAY;
451 array->depth = json->curr_node->depth + 1;
452 if (array->depth > json->depth)
453 json->depth = array->depth;
454
455 acl_json_node_add_child(json->curr_node, array);
456
457 if (LEN(json->curr_node->ltag) > 0)
458 json->curr_node->tag_node = array;
459
460 json->curr_node = array;
461 json->status = ACL_JSON_S_ELEMENT;
462
463 /* ���������Ϊ�գ���ֱ�Ӳ�ѯ���ֵܽڵ� */
464 if (*data == ']') {
465 json->status = ACL_JSON_S_NEXT;
466 data++;
467 }
468
469 return data;
470}
471
472static const char *json_element(ACL_JSON *json, const char *data)
473{

Callers

nothing calls this directly

Calls 2

acl_json_node_allocFunction · 0.85
acl_json_node_add_childFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…