looked at previous answers but cant solve it, the json.loads wont work.
the code:
import json
import operator
Data_to_python ={}
Bank_Data_note= open('Data_for_python.txt','r') # open file
Bank_Data_str = Bank_Data_note.read()
print(Bank_Data_str)
Data_to_python =json.loads(Bank_Data_str) # dictinary
print(Data_to_python)
the json format from text file:
{{"Transaction_1":{"Name":"Magnolia","Location":"Ayilon male","Amount":289,"Date":"5/5/18"},
{"Transaction_2":{"Name":"Landver,"Location":"Cinima-city Ramat-hashron","Amount":15,"Date":"15/5/18"},
{"Transaction_3":{"Name":"Superfarm","Location":"Shivat-hacochvim male","Amount":199,"Date":"7/5/18"},
{"Transaction_4":{"Name":"Printing solutions","Location":"Afeka tel-aviv","Amount":16,"Date":"25/5/18"}}
I got this:
obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)