protected function createReader(ResourceInterface $resource)
    {
        try {
            $jsonFile = $resource->getFile()->getPathname();

            $this->fileObject = new \SplFileObject($jsonFile);
        } catch (EmptyResponseException $e) {
            // getting an empty response is not a problem for jsonlines files, this
            // just means that there are no records.
            $this->fileObject = new \ArrayIterator();
        }
    }