| 69 | } |
| 70 | |
| 71 | std::string optional_string(const engine::io::json::Value & object, const std::string & key) { |
| 72 | const auto * value = object.find(key); |
| 73 | return value == nullptr || value->is_null() ? std::string{} : value->as_string(); |
| 74 | } |
| 75 | |
| 76 | std::string required_string(const engine::io::json::Value & object, const std::string & key) { |
| 77 | auto value = optional_string(object, key); |
no test coverage detected