async function getModelJSON(modelPath, fileName, fatal = true, options = {}) {
    const buffer = await getModelFile(modelPath, fileName, fatal, options, false);
    if (buffer === null) {
        // Return empty object
        return {}
    }

    const decoder = new TextDecoder('utf-8');
    const jsonData = decoder.decode(/** @type {Uint8Array} */(buffer));

    return JSON.parse(jsonData);
}
Fetches a JSON file from a given path and file name.

@param {string} modelPath The path to the directory containing the file.
@param {string} fileName The name of the file to fetch.
@param {boolean} [fatal=true] Whether to throw an error if the file is not found.
@param {PretrainedOptions} [options] An object containing optional parameters.
@returns {Promise<Object>} The JSON data parsed into a JavaScript object.
@throws Will throw an error if the file is not found and `fatal` is true.