summaryrefslogtreecommitdiff
path: root/Lib/json
diff options
context:
space:
mode:
authorEzio Melotti <devnull@localhost>2011-04-13 07:04:18 +0300
committerEzio Melotti <devnull@localhost>2011-04-13 07:04:18 +0300
commit6a7f2e7204141cefedf8f832695bed1297532a0e (patch)
tree56889f2ece51cd3920a8e0c3b035da85af54685f /Lib/json
parent12c759ae9d9d7f3d72271c9a1fe167fe0bba085b (diff)
downloadcpython-6a7f2e7204141cefedf8f832695bed1297532a0e.tar.gz
#9233: Fix json to work properly even when _json is not available.
Diffstat (limited to 'Lib/json')
-rw-r--r--Lib/json/decoder.py2
-rw-r--r--Lib/json/scanner.py1
2 files changed, 2 insertions, 1 deletions
diff --git a/Lib/json/decoder.py b/Lib/json/decoder.py
index d606cbd8c0..7b3d7d54a1 100644
--- a/Lib/json/decoder.py
+++ b/Lib/json/decoder.py
@@ -214,7 +214,7 @@ def JSONObject(s_and_end, strict, scan_once, object_hook, object_pairs_hook,
pairs = object_hook(pairs)
return pairs, end
-def JSONArray(s_and_end, scan_once, context, _w=WHITESPACE.match):
+def JSONArray(s_and_end, scan_once, _w=WHITESPACE.match, _ws=WHITESPACE_STR):
s, end = s_and_end
values = []
nextchar = s[end:end + 1]
diff --git a/Lib/json/scanner.py b/Lib/json/scanner.py
index b4f356146f..f94d236149 100644
--- a/Lib/json/scanner.py
+++ b/Lib/json/scanner.py
@@ -22,6 +22,7 @@ def py_make_scanner(context):
parse_int = context.parse_int
parse_constant = context.parse_constant
object_hook = context.object_hook
+ object_pairs_hook = context.object_pairs_hook
def _scan_once(string, idx):
try: