diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2013-03-12 23:52:34 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2013-03-12 23:52:34 (GMT) |
commit | a7d64a6f4c0307f9c58ea170705b1552580d93eb (patch) | |
tree | dec59285d3c60b71c205dc3f62cb52aa4f5d7d52 /Lib/json/decoder.py | |
parent | 7343cb0790d3ac722ee788d5c2044cbda770a140 (diff) | |
download | cpython-a7d64a6f4c0307f9c58ea170705b1552580d93eb.zip cpython-a7d64a6f4c0307f9c58ea170705b1552580d93eb.tar.gz cpython-a7d64a6f4c0307f9c58ea170705b1552580d93eb.tar.bz2 |
#17368: Fix an off-by-one error in the Python JSON decoder that caused a failure while decoding empty object literals when object_pairs_hook was specified.
Diffstat (limited to 'Lib/json/decoder.py')
-rw-r--r-- | Lib/json/decoder.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/json/decoder.py b/Lib/json/decoder.py index 0c59edd..938ebff 100644 --- a/Lib/json/decoder.py +++ b/Lib/json/decoder.py @@ -167,7 +167,7 @@ def JSONObject(s_and_end, strict, scan_once, object_hook, object_pairs_hook, if nextchar == '}': if object_pairs_hook is not None: result = object_pairs_hook(pairs) - return result, end + return result, end + 1 pairs = {} if object_hook is not None: pairs = object_hook(pairs) |