I have been reading the documentation of the pyinstaller for hours. I cannot understand how to use the option --resource RESOURCE
It says
-r RES
I converted the python application to exe with pyinstaller using below cmmand
pyinstaller --onefile main.py
and then I copied the json file to the dist folder created by pyinstaller and it worked. hope this helps you to resolve this issue.
Note : I havent included any resource command with pyinstaller