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

Function test_json_find2

lib_acl/samples/json/json1/main.cpp:146–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146static void test_json_find2(ACL_JSON* json)
147{
148 const char* tag = "onclick";
149 ACL_ARRAY* a = acl_json_getElementsByTagName(json, tag);
150 ACL_ITER iter;
151
152 printf("------------ in %s ------------\r\n", __FUNCTION__);
153
154 if (a) {
155 acl_foreach(iter, a) {
156 ACL_JSON_NODE* node = (ACL_JSON_NODE*) iter.data;
157 printf("find %s result: %s\r\n", tag, STR(node->text));
158 }
159 acl_json_free_array(a);
160 }
161
162 tag = "help";
163 a = acl_json_getElementsByTagName(json, tag);
164 if (a) {
165 acl_foreach(iter, a) {
166 ACL_JSON_NODE* node = (ACL_JSON_NODE*) iter.data;
167 printf("find %s result: %s\r\n", tag, STR(node->text));
168 }
169 acl_json_free_array(a);
170 }
171 printf(">>find %s end\r\n\r\n", tag);
172}
173
174static void test_json_data(const char* data)
175{

Callers 1

test_json_dataFunction · 0.85

Calls 2

acl_json_free_arrayFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…