Parsing comma separated JSON from a file

前端 未结 2 670
执笔经年
执笔经年 2021-01-25 15:07

I am reading a file that contains JSON separated by commas. So for example

{
  ...JSON
},
{
  ...JSON
},
{
  ...JSON
}

I know for sure they are

2条回答
  •  情深已故
    2021-01-25 15:14

    you can parse the data to dict by following this link. Parsing values from a JSON file using Python?

    and convert the dict to list by the

    .items()
    

    function to the parsed dictionary.

    Hope this one solves the problem. Good luck.

提交回复
热议问题