protected function FeedsExJsonPath::getParser in Feeds extensible parsers 7
Returns the JSONPath parser.
Return value
FeedsExJsonPathParserInterface The JSONPath parser.
File
- src/
FeedsExJsonPath.inc, line 139 - Contains FeedsExJsonPath.
Class
- FeedsExJsonPath
- Parses JSON via JSONPath.
Code
protected function getParser() {
if (!isset($this->parser)) {
if (class_exists('Flow\\JSONPath\\JSONPath')) {
$this->parser = new FeedsExJsonPathParserFlow();
}
}
if (!isset($this->parser)) {
throw new RuntimeException(t('Could not load the JSONPath library.'));
}
return $this->parser;
}