Cocos Creator 3.2.1: resources.load JSON file is returned null

I followed this guide but the result returned null Asset Manager · Cocos Creator

resources.load('data/cards.json', JsonAsset, (err, asset)=>{
      log(asset);
});

image

But the deprecated class is working
image

If I missed the documents, please let me know.
Thanks.

I asked engineering to have a look.

Hello, have you solved it? If no so try this:

private static loadRes(url: string) {
    return new Promise<JsonAsset>((resolve, reject) => {
        resources.load(url, null, (error, asset) => {
            if (error) {
                reject(error)
            }

            resolve(asset)
        })
    })
}

You do not need to add a file suffix.

resources.load(‘data/cards’, JsonAsset, (err, asset)=>{
log(asset);
});