在解析从 GitHub WebHook 收到的有效负载时,遇到此问题 JSONDecodeError: Expecting value: line 1 column 1 (char 0)
有效载荷看起来像
payload=%7B%22action%22%3A%22created%22%2C%22issue%22%3A%7B%22url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2FChaiBapchya%2Fincubator-mxnet%2Fissues%2F13%22%2C%22repository_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2FChaiBapchya%2Fincubator-mxnet%22%2C%22labels_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2FChaiBapchya%2Fincubator-mxnet%2Fissues%2F13%2Flabels%7B%2Fname%7D%22%2C%22comments_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2FChaiBapchya%2Fincubator-mxnet%2Fissues%2F13%2Fcomments%22%2C%22events_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2FChaiBapchya%2Fincubator-mxnet%2Fissues%2F13%2Fevents%22%2C%22html_url%22%3A%22https%3A%2F%2Fgithub.com%2FChaiBapchya%2Fincubator-mxnet%2Fpull%2F13%22%2C%22id%22%3A57165580
错误堆栈跟踪
File "/var/lang/lib/python3.7/json/__init__.py", line 348, in loads
return _default_decoder.decode(s)
File "/var/lang/lib/python3.7/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/var/lang/lib/python3.7/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)