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

Function deserialize

lib_acl_cpp/include/acl_cpp/serialize/serialize.hpp:10–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8
9template<typename T>
10bool deserialize(json& j, T& o, string* err = NULL) {
11 if (!j.finish())
12 {
13 if (err)
14 err->append("json not complete yet!");
15 return false;
16 }
17
18 std::pair<bool, std::string> r = gson(j.get_root(), o);
19 if (r.first == false)
20 {
21 if (err)
22 err->format_append("deserialize error=%s, json=[%s]",
23 r.second.c_str(), j.to_string().c_str());
24 return false;
25 }
26
27 return true;
28}
29
30template<typename T>
31void serialize(T& o, string& buf) {

Callers 1

get_attrsMethod · 0.50

Calls 5

gsonFunction · 0.50
finishMethod · 0.45
appendMethod · 0.45
c_strMethod · 0.45
to_stringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…