JSONDecodeError

The Python exception json.loads raises when the text it is given is not valid JSON.

In more detail

Catching it lets a program handle malformed input instead of crashing. Its message says where in the text parsing failed.

Example

The poison-message lesson routes records that raise it to a dead letter queue.

Related terms

Taught in

References