can't read json file with python. getting type error: json object is 'TextIOWrapper'

前端 未结 3 1472
不知归路
不知归路 2020-12-03 11:31

I\'m trying to read from a json file.

This is how I created the file:

import requests
import json
import time
from pprint import pprint

BASE_URL = \         


        
3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-03 11:57

    json.load() is for loading a file. json.loads() works with strings.

提交回复
热议问题