public function parseFile($file, $assoc = false, $depth = 512)
    {
        if (false === is_file($file)) {
            throw new InvalidArgumentException(sprintf(
                'The JSON file path "%s" is either not a file or it does not exist.',
                $file
            ));
        }

        if (false === ($contents = @ file_get_contents($file))) {
            $error = error_get_last();

            throw new RuntimeException(sprintf(
                'The JSON file "%s" could not be read: %s',
                $file,
                $error['message']
            ));
        }

        return $this->parse($contents, $assoc, $depth);
    }