This repository was archived by the owner on Mar 6, 2025. It is now read-only.

Description
Because I only see reasons against it:
- Simply because a JSON can be passed also as bytes - hence
json.loads() method accepts types of bytes and bytearray as well.
- If I decide to use this decorator on a handler it means I expect a JSON in the body, therefore I'd like it to return a 400 even when the input is not a string. This could be skipped it the body is already a dictionary.
I understand changing the logic to start acting on non-strings is most likely breaking. If a maintainer gives a green light, I can create a PR.
Also, I am curious of other opinions.