python json.loads 得到的是unicode对象【垃圾python】

一般来说使用json.loads(str)可以得到一个dict,但是不知道为啥一直得到的是unicode对象,在terminal中就可以得到dict。

垃圾python,垃圾python,垃圾python

解决方法:

tmp = json.loads(json.loads(tt.encode('utf-8')).encode('utf-8'))

 

posted @ 2020-05-25 15:37  母翟龙  阅读(1701)  评论(0编辑  收藏  举报