Python JSON module has no attribute 'dumps'

前端 未结 10 1846
攒了一身酷
攒了一身酷 2021-01-01 09:14

I am running Python 2.7 (x64 Linux) and trying to convert a dict to a JSON object.

>>> import sys
>>> sys.version_info
sys.ver         


        
10条回答
  •  灰色年华
    2021-01-01 09:28

    I create a file named json.py. When I run this I got the error, so I rename it and it words for me.

提交回复
热议问题