protected function readInput()
    {
        if (!$this->parser) {
            if ('-' !== $this->inputPath) {
                $this->stdin = fopen($this->inputPath, 'r');
            }

            if ('mimedir' === $this->inputFormat) {
                $this->parser = new Parser\MimeDir($this->stdin, ($this->forgiving ? Reader::OPTION_FORGIVING : 0));
            } else {
                $this->parser = new Parser\Json($this->stdin, ($this->forgiving ? Reader::OPTION_FORGIVING : 0));
            }
        }

        return $this->parser->parse();
    }