readJson(loc, factory = (_fs || _load_fs()).readJson) {
    try {
      return factory(loc);
    } catch (err) {
      if (err instanceof SyntaxError) {
        throw new (_errors || _load_errors()).MessageError(this.reporter.lang('jsonError', loc, err.message));
      } else {
        throw err;
      }
    }
  }
Call the passed factory (defaults to fs.readJson) and rethrow a pretty error message if it was the result
of a syntax error.