Python/Json:Expecting property name enclosed in double quotes

前端 未结 16 2326
南方客
南方客 2020-11-27 03:23

I\'ve been trying to figure out a good way to load JSON objects in Python. I send this json data:

{\'http://example.org/about\': {\'http://purl.org/dc/terms/         


        
16条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-27 03:46

    I have run into this problem multiple times when the JSON has been edited by hand. If someone was to delete something from the file without noticing it can throw the same error.

    For instance, If your JSON last "}" is missing it will throw the same error.

    So If you edit you file by hand make sure you format it like it is expected by the JSON decoder, otherwise you will run into the same problem.

    Hope this helps!

提交回复
热议问题