I solved this issue on Windows by setting each key in the JSON file as a separate environment variable.
Which went well with well. But I was facing an issue with a key in my JSON file because it has a humongous value that spanned many lines in the terminal.
To fix that this Windows Powershell Command that did the job for me:
flyctl secrets set private_key="$((Get-Content secrets.json | ConvertFrom-Json).private_key)" --json
Here is the bash equivalent of this(Not verified):
flyctl secrets set private_key="$(jq -r '.private_key' secrets.json)" --json
These commands basically extract the key private_key from the secrets.json file in my root directory.
The resulting value is passed as a parameter to the flyctl secrets set command.