Move json.loads to run_main