| 95 | } |
| 96 | |
| 97 | const bool GetBool(const nlohmann::json &obj, const std::string &key, const bool defVal) { |
| 98 | if(obj.is_object() && obj.contains(key) && obj[key].is_boolean()) { |
| 99 | return obj[key].get<bool>(); |
| 100 | } else { |
| 101 | return defVal; |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | const nlohmann::json &GetObject(const nlohmann::json &obj, const std::string &key, const nlohmann::json &defVal) { |
| 106 | if(obj.is_object() && obj.contains(key) && obj[key].is_object()) { |
no outgoing calls
no test coverage detected