| 201 | if (value->is_string()) { |
| 202 | const auto str = value->as_string(); |
| 203 | if (str == "true" || str == "1") { |
| 204 | return true; |
| 205 | } |
| 206 | if (str == "false" || str == "0") { |
| 207 | return false; |
| 208 | } |
| 209 | } |
| 210 | throw std::runtime_error(key + " must be a boolean"); |
no test coverage detected