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

Method toJson

lib/sourceanalysis/SourceAnalysisReport.cpp:81–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81Json::Value SourceAnalysisReport::toJson() const {
82 Json::Value Result;
83 Result[getReportType()]["mainfuncloc"] = MainFuncLoc.getJsonValue();
84
85 Json::Value SourceInfoJson;
86 for (const auto &Iter1 : SourceInfoMap) {
87 Json::Value SourceInfoElementJson;
88 SourceInfoElementJson["endoffset"] = Iter1.second.EndOffset;
89 Json::Value IncludedHeaderElementJson(Json::arrayValue);
90 for (const auto &Iter2 : Iter1.second.IncludedHeaders)
91 IncludedHeaderElementJson.append(Iter2);
92 SourceInfoElementJson["includedheaders"] = IncludedHeaderElementJson;
93 Result[getReportType()]["sourceinfo"][Iter1.first] = SourceInfoElementJson;
94 }
95
96 Result[getReportType()]["srcbasedir"] = SrcBaseDir;
97 return Result;
98}

Callers

nothing calls this directly

Calls 1

getJsonValueMethod · 0.80

Tested by

no test coverage detected