readJson = (fs, p, callback) => {
	if ("readJson" in fs)
		return /** @type {NonNullable<InputFileSystem["readJson"]>} */ (
			fs.readJson
		)(p, callback);
	fs.readFile(p, (err, buf) => {
		if (err) return callback(err);
		let data;
		try {
			data = JSON.parse(/** @type {Buffer} */ (buf).toString("utf-8"));
		} catch (err1) {
			return callback(/** @type {Error} */ (err1));
		}
		return callback(null, data);
	});
}
@param {InputFileSystem} fs a file system
@param {string} p an absolute path
@param {ReadJsonCallback} callback callback
@returns {void}