DEV Community

CoderLegion
CoderLegion

Posted on

1 1

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)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay