Split out the JSON file opening and reading logic into a Windows and Posix function to allow only reading the contents of a file once.
This is the same code as #1499 but because I am a doofus and messed up the git commands, I need to remake the PR (as because I force pushed to the branc116 branch the contents of main, github auto-closed the PR denying me the chance of fixing it without reopening a new PR).
Split out the JSON file opening and reading logic into a Windows and Posix function to allow only reading the contents of a file once.
This is the same code as #1499 but because I am a doofus and messed up the git commands, I need to remake the PR (as because I force pushed to the branc116 branch the contents of main, github auto-closed the PR denying me the chance of fixing it without reopening a new PR).