Noting common function `_reject_invalid_json` in both synapse and sygnal _Originally posted by @H-Shay in https://github.com/matrix-org/matrix-python-common/issues/1#issuecomment-966597137_