Python accessing data in JSON object

前端 未结 3 991
既然无缘
既然无缘 2021-02-13 12:53

so I do this in my script:

import json
info = json.loads(get_info())
print info

Which outputs:

richard@richard-desktop:~/projec         


        
3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-13 13:59

    Try

    from StringIO import StringIO
    io = StringIO(get_info())
    json.load(io)
    

提交回复
热议问题