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
- json module — The Python standard library module that converts between Python values and JSON text.
- poison message — A message that fails every time it is processed, for example because it is malformed, and would block a queue if retried forever.
- exception — An error object a program raises to stop normal flow and report that something went wrong.
Taught in
- Poison Messages And Dead Letter Topics — Apache Kafka & Event Streaming