diff --git a/Lib/json/decoder.py b/Lib/json/decoder.py index 364e44d40cc307..803a7ff0e68e81 100644 --- a/Lib/json/decoder.py +++ b/Lib/json/decoder.py @@ -370,6 +370,8 @@ def raw_decode(self, s, idx=0): have extraneous data at the end. """ + s = s.lstrip() + try: obj, end = self.scan_once(s, idx) except StopIteration as err: