MCPcopy Create free account
hub / github.com/OSGeo/PROJ / getArrayMember

Function getArrayMember

src/transformations/defmodel_impl.hpp:333–343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

331// ---------------------------------------------------------------------------
332
333static 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

Callers 1

parseMethod · 0.70

Calls 2

ParsingExceptionClass · 0.70
containsMethod · 0.45

Tested by

no test coverage detected