| 331 | // --------------------------------------------------------------------------- |
| 332 | |
| 333 | static json getArrayMember(const json &j, const char *key) { |
| 334 | if (!j.contains(key)) { |
| 335 | throw ParsingException(std::string("Missing \"") + key + "\" key"); |
| 336 | } |
| 337 | const json obj = j[key]; |
| 338 | if (!obj.is_array()) { |
| 339 | throw ParsingException(std::string("The value of \"") + key + |
| 340 | "\" should be a array"); |
| 341 | } |
| 342 | return obj; |
| 343 | } |
| 344 | |
| 345 | // --------------------------------------------------------------------------- |
| 346 |
no test coverage detected