I have a list of python dictionaries separated with commas in my file, i have to enclose these comma separated dictionaries in a python list to read my file as a json.
For Eg: myfile
{
"title": "Sample Konfabulator Widget",
"name": "main_window",
"width": 500,
"height": 500
},
{
"title": "Sample Widget",
"name": "main_window1",
"width": 300,
"height": 200
}
I have to make this as
[
{
"title": "Sample Konfabulator Widget",
"name": "main_window",
"width": 500,
"height": 500
},
{
"title": "Sample Widget",
"name": "main_window1",
"width": 300,
"height": 200
}
]
Any suggestions, how to achieve this?