| 272 | } |
| 273 | |
| 274 | std::string extractType(NL::json& node) |
| 275 | { |
| 276 | std::string type; |
| 277 | |
| 278 | auto it = node.find("type"); |
| 279 | if (it != node.end()) |
| 280 | { |
| 281 | NL::json& val = *it; |
| 282 | if (!val.is_null()) |
| 283 | { |
| 284 | if (val.is_string()) |
| 285 | type = val.get<std::string>(); |
| 286 | else |
| 287 | throw pdal_error("JSON pipeline: 'type' must be specified as " |
| 288 | "a string."); |
| 289 | } |
| 290 | node.erase(it); |
| 291 | } |
| 292 | return type; |
| 293 | } |
| 294 | |
| 295 | bool extractOption(Options& options, const std::string& name, const NL::json& node) |
| 296 | { |
no test coverage detected