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)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay