MCPcopy Create free account
hub / github.com/Tencent/libpag / getJSONValue

Method getJSONValue

test/src/utils/Baseline.cpp:285–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283}
284
285std::string Baseline::getJSONValue(nlohmann::json& target, const std::string& key) {
286 std::lock_guard<std::mutex> autoLock(locker);
287 std::string jsonKey;
288 auto json = FindJSON(target, key, &jsonKey);
289 auto value = (*json)[jsonKey];
290 return value != nullptr ? value.get<std::string>() : "";
291}
292
293void Baseline::setJSONValue(nlohmann::json& target, const std::string& key,
294 const std::string& value) {

Callers

nothing calls this directly

Calls 1

FindJSONFunction · 0.85

Tested by

no test coverage detected