validating JSON from command line using `python -m jsontool` gives 'No JSON object could be decoded'

后端 未结 1 1475
眼角桃花
眼角桃花 2021-02-12 09:25

I have a data.json file that I\'m validating through the command line using python\'s json.tool, but it keeps giving me back an error message:

$ pyt         


        
相关标签:
1条回答
  • 2021-02-12 09:58

    It was because of the trailing comma after the last nested list [ "city", null, {} ]. I accidentally left it in and JSON doesn't allow them.

    0 讨论(0)
提交回复
热议问题