В ваших данных JSON было слишком много скобок!И в нем отсутствовала двойная кавычка.Вот исправленная версия, а также некоторый json
код загрузки и выгрузки для проверки.
import json
data = '''
{
"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"}
}'''
obj = json.loads(data)
print(obj)
print('- ' * 20)
# Convert back to JSON for nicer printing
print(json.dumps(obj, indent=4))
вывод
{'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'}}
- - - - - - - - - - - - - - - - - - - -
{
"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"
}
}