<class '_io.TextIOWrapper'>
with open('id=MS4.json', encoding='utf-8',) as id_json: #打开json包
print(id_json)
print(type(id_json))
会得到如下内容
<_io.TextIOWrapper name='id=MS4.json' mode='r' encoding='utf-8'>
<class '_io.TextIOWrapper'>
我们没有得到想要的内容,其实是在输出的时候 添加一个 .read() 就好了
with open('id=MS4.json', encoding='utf-8',) as id_json: #打开json包
print(id_json.read())
print(type(id_json))