| 167 | } |
| 168 | return out; |
| 169 | } |
| 170 | |
| 171 | inline std::vector<int64_t> require_i64_array_or_scalar(const Value & object, const std::string & key) { |
| 172 | const auto & value = object.require(key); |
| 173 | if (value.is_number()) { |
| 174 | return {value.as_i64()}; |
| 175 | } |
| 176 | return number_array_as<int64_t>(value); |
| 177 | } |
| 178 | |
| 179 | inline std::vector<int64_t> require_i64_array(const Value & object, const std::string & key) { |
| 180 | return number_array_as<int64_t>(object.require(key)); |
| 181 | } |
| 182 | |
| 183 | inline std::unordered_map<std::string, int64_t> require_i64_object(const Value & object, const std::string & key) { |
| 184 | std::unordered_map<std::string, int64_t> values; |
no test coverage detected