I'm trying to read data from json file by following code but i get error, any idea how to fix that?
file= open("C:\\Users\\User\\Desktop\\Post.json",'r')
json_in=file.read()
request_json=json.loads(json_in)
print(request_json)
Json file
"name": "Test",
"job": "Programer"
CodePudding user response:
try this
file = open("C:\\Users\\User\\Desktop\\Post.json",'r')
request_json = json.load(file)