我有一个JSON文件从恢复请求.get
以下是我的一些JSON:
[{"order":{"id":"B4589B26","status_order_id":5,"status_order_name":"Sent","customer_id":326
"order_products":[{"order_product":{"id":96218,"order_id":96538,"product_id":59320,}}],"customer_email":"user@gmail.com","customer_company":"SARL","customer_name":"user user", .....
这是我的代码:
^{pr2}$我有个错误:
'not {!r}'.format(s.__class__.__name__))
TypeError: the JSON object must be str, bytes or bytearray, not 'Response'
您不需要这行
json_obj = json.loads(r)
。r.json()
返回一个json响应。在例如:
这是正确的解决方案:
相关问题 更多 >
编程相关推荐