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

Function parseJsonFileToJsonValue

lib/utils/FileUtil.cpp:134–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134Json::Value parseJsonFileToJsonValue(const char *jsonPath) {
135 std::string configDoc = readFile(jsonPath);
136 Json::CharReaderBuilder rbuilder;
137 std::istringstream input(configDoc);
138
139 Json::Value root;
140 std::string errs;
141 Json::parseFromStream(rbuilder, input, &root, &errs);
142 std::cout << "parsing json: " << errs << jsonPath << std::endl;
143 return root;
144}
145
146std::string getNormalizedPath(std::string Path) {
147

Callers 5

loadMethod · 0.85
loadUTMethod · 0.85
fromJsonMethod · 0.85
UTLoaderMethod · 0.85
TESTFunction · 0.85

Calls 2

readFileFunction · 0.85
parseFromStreamFunction · 0.85

Tested by 1

TESTFunction · 0.68