Json file opening error

import json
with open(r"D://Json//students.json",“r”) as file:
d=json.loads(file)

when i do this, it gives me an error saying-

raise TypeError(f'the JSON object must be str, bytes or bytearray, '

TypeError: the JSON object must be str, bytes or bytearray, not TextIOWrapper

Instead of loads, try load.
json.loads converts a string to a python object, json.load converts a json file into a python object.

Traceback (most recent call last):
File “C:/Users/shiva/Desktop/Python Intro CB/Working with files.py”, line 52, in
data=json.load(file)
File “C:\Users\shiva\AppData\Local\Programs\Python\Python38-32\lib\json_init_.py”, line 293, in load
return loads(fp.read(),
File “C:\Users\shiva\AppData\Local\Programs\Python\Python38-32\lib\json_init_.py”, line 357, in loads
return _default_decoder.decode(s)
File “C:\Users\shiva\AppData\Local\Programs\Python\Python38-32\lib\json\decoder.py”, line 340, in decode
raise JSONDecodeError(“Extra data”, s, end)
json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 41)

SHOWING THIS ERROR

Can you share your code by saving it on the given below link .

Also please make sure that the format of data present in the json file is correct.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.