Mar-10-2022, 10:47 AM
ı tried to use json load
import json with open('data6.json', 'r') as myfile: data = json.load(myfile)and data6.json is like that
{"Manufacturer": "VMware, Inc.", "Model": "VMware7,1", "Name": "DC01"} , {"Index": "1", "IPAddress": "192.168.1.240,fe80::350e:d28d:14a5:5cbb" }but it gives the error
Traceback (most recent call last): File "C:\Users\DELL\AppData\Roaming\JetBrains\PyCharmCE2021.3\scratches\scratch_38.py", line 3, in <module> data = json.load(myfile) File "C:\Users\DELL\AppData\Local\Programs\Python\Python39\lib\json\__init__.py", line 293, in load return loads(fp.read(), File "C:\Users\DELL\AppData\Local\Programs\Python\Python39\lib\json\__init__.py", line 346, in loads return _default_decoder.decode(s) File "C:\Users\DELL\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 340, in decode raise JSONDecodeError("Extra data", s, end) json.decoder.JSONDecodeError: Extra data: line 1 column 72 (char 71) Process finished with exit code 1