| 95 | inline std::string require_string(const Value & object, const std::string & key) { |
| 96 | return object.require(key).as_string(); |
| 97 | } |
| 98 | |
| 99 | inline int64_t optional_i64(const Value & object, const std::string & key, int64_t default_value) { |
| 100 | const auto * value = object.find(key); |
| 101 | return value != nullptr && value->is_number() ? value->as_i64() : default_value; |
| 102 | } |
| 103 |
no test coverage detected