What is the issue with Python while processing my JSON file?

前端 未结 3 1846
余生分开走
余生分开走 2021-01-29 10:56

I have tried to remove the first key and value from a json file using python. While running the program, I came across error, they are mentioned as follows:

imp         


        
3条回答
  •  既然无缘
    2021-01-29 11:23

    As per my comment, the input file is not valid JSON.

    This answer multiple json dictionaries python tells you how to successfully read such a file, which consists of a concatenation of valid JSON entities rather tyan a JSON list of such entities.

    The alternative if and only if you can rely on the line-structure of the file, is to read line by line and decode each line separately.

提交回复
热议问题