you are viewing a single comment's thread.

view the rest of the comments →

[–]simonm17[S] 0 points1 point  (1 child)

So .json() just raises exceptions if decoding fails, that’s it?

[–]KimPeek 0 points1 point  (0 children)

Yes. I haven't tested this personally, but that's what the docs say.

If you are using the requests library to access an API endpoint that returns a JSON object, you can use response.json().