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

Function parse

app/gson/test/parse6/main.cpp:11–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9#include "struct.gson.h" // 由 gson 工具根据 struct.stub 生成
10
11static void parse(const char* s)
12{
13 acl::json json(s);
14 files_outdate files;
15 acl::string err;
16 if (acl::deserialize<files_outdate>(json, files, &err) == false) {
17 printf("parse error=%s\r\n", err.c_str());
18 return;
19 }
20
21 printf("ok, files size=%lu, values size=%lu\r\n",
22 (unsigned long) files.files.size(),
23 (unsigned long) files.values.size());
24
25 for (std::vector<acl::string>::const_iterator cit = files.files.begin();
26 cit != files.files.end(); ++cit) {
27
28 printf("[%s]\r\n", (*cit).c_str());
29 }
30
31 for (std::vector<int>::const_iterator cit = files.values.begin();
32 cit != files.values.end(); ++cit) {
33
34 printf("int->%d\r\n", *cit);
35 }
36}
37
38static void parse2(const char* s)
39{

Callers 1

testFunction · 0.70

Calls 4

beginMethod · 0.80
c_strMethod · 0.45
sizeMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…