| 470 | } |
| 471 | |
| 472 | static const char *json_element(ACL_JSON *json, const char *data) |
| 473 | { |
| 474 | /* ���������Ա���� */ |
| 475 | ACL_JSON_NODE *element; |
| 476 | |
| 477 | SKIP_SPACE(data); |
| 478 | if (*data == 0) |
| 479 | return data; |
| 480 | |
| 481 | if (*data == '{') { |
| 482 | data++; |
| 483 | json->status = ACL_JSON_S_OBJ; |
| 484 | return data; |
| 485 | } else if (*data == '[') { |
| 486 | data++; |
| 487 | json->status = ACL_JSON_S_ARRAY; |
| 488 | return data; |
| 489 | } |
| 490 | |
| 491 | element = acl_json_node_alloc(json); |
| 492 | element->type = ACL_JSON_T_ELEMENT; |
| 493 | element->depth = json->curr_node->depth + 1; |
| 494 | if (element->depth > json->depth) |
| 495 | json->depth = element->depth; |
| 496 | |
| 497 | acl_json_node_add_child(json->curr_node, element); |
| 498 | |
| 499 | /* ���������Ա������Ϊ��ǰ JSON �����ڵ� */ |
| 500 | json->curr_node = element; |
| 501 | json->status = ACL_JSON_S_VALUE; |
| 502 | |
| 503 | return data; |
| 504 | } |
| 505 | |
| 506 | /* ������ǩֵ����ֵ�п����Ǵ��ı�(���ýڵ�ΪҶ�ڵ�)��Ҳ�п�����һ���ӽڵ� */ |
| 507 |
nothing calls this directly
no test coverage detected
searching dependent graphs…