Basically the data we got in the response was in byte
format (try printing data you will see 'b{
)
But for json.loads() it accepts a string. Though python automatically converts the data into compatible format i.e utf-8
but in this case, we have to explicitly convert byte into str first.
Why i m getting errors using json
1 Like