DEV Community

CoderLegion
CoderLegion

Posted on

Simplejson.scanner.jsondecodeerror: expecting value: line 1 column 1 (char 0)-Fixed

I am facing error “Expecting value: line 1 column 1 (char 0)” when trying to decode the JSON.The URL I use for a API call works fine in a browser, but gives above error when done through the curl request. The error happens at the return simplejson.loads(response_json)

Solution :
The solution is as below:

· There is no need to use a simplejson library, a same library is included with Python as a json module.

· There is no need to decode the response from a UTF8 to unicode, a simplejson / json .loads() method can handle UTF8 encoded data natively.

Read more here

Top comments (0)