MCPcopy Create free account
hub / github.com/Samsung/UTopia / deserialize

Method deserialize

lib/inputanalysis/InputAnalysisReport.cpp:53–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53bool InputAnalysisReport::deserialize(Json::Value &Root,
54 const TypeAnalysisReport &Report) {
55 try {
56 const auto &ReportJson = Root[getReportType()];
57 for (const auto &DefJson : ReportJson["Definitions"]) {
58 Definition D;
59 if (!D.fromJson(DefJson, Report))
60 return false;
61 if (!DefMap.emplace(D.ID, std::make_shared<Definition>(D)).second)
62 return false;
63 }
64 for (const auto &UTJson : ReportJson["unittests"])
65 Unittests.emplace_back(UTJson);
66 } catch (Json::Exception &E) {
67 return false;
68 }
69 return true;
70}
71
72Json::Value InputAnalysisReport::toJson(
73 const std::map<unsigned, std::shared_ptr<Definition>> &DefMap) const {

Callers

nothing calls this directly

Calls 1

fromJsonMethod · 0.45

Tested by

no test coverage detected