| 91 | } |
| 92 | |
| 93 | static std::string GetJSONValue(nlohmann::json& target, const std::string& key) { |
| 94 | std::lock_guard<std::mutex> autoLock(jsonLocker); |
| 95 | std::string jsonKey; |
| 96 | auto json = FindJSON(target, key, &jsonKey); |
| 97 | auto value = (*json)[jsonKey]; |
| 98 | return value != nullptr ? value.get<std::string>() : ""; |
| 99 | } |
| 100 | |
| 101 | static void SetJSONValue(nlohmann::json& target, const std::string& key, const std::string& value) { |
| 102 | std::lock_guard<std::mutex> autoLock(jsonLocker); |
no test coverage detected