summaryrefslogtreecommitdiff
path: root/django/utils/simplejson/decoder.py
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2007-01-30 22:34:15 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2007-01-30 22:34:15 +0000
commit695302ce9214405e166ef559bdd8abb5fceaa020 (patch)
tree8f42488e7d95244bab3db7b2bf934e006940521a /django/utils/simplejson/decoder.py
parent1e3d035fcc1811b6b8028655784e19caaedc281f (diff)
Fixed #3320: upgraded django.utils.simplejson to simplejson version 1.5. Thanks, Lawrence Oluyede.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4454 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils/simplejson/decoder.py')
-rw-r--r--django/utils/simplejson/decoder.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/django/utils/simplejson/decoder.py b/django/utils/simplejson/decoder.py
index 684af8c9ad..66f68a200b 100644
--- a/django/utils/simplejson/decoder.py
+++ b/django/utils/simplejson/decoder.py
@@ -127,6 +127,7 @@ def JSONObject(match, context, _w=WHITESPACE.match):
raise ValueError(errmsg("Expecting property name", s, end))
end += 1
encoding = getattr(context, 'encoding', None)
+ iterscan = JSONScanner.iterscan
while True:
key, end = scanstring(s, end, encoding)
end = _w(s, end).end()
@@ -134,7 +135,7 @@ def JSONObject(match, context, _w=WHITESPACE.match):
raise ValueError(errmsg("Expecting : delimiter", s, end))
end = _w(s, end + 1).end()
try:
- value, end = JSONScanner.iterscan(s, idx=end).next()
+ value, end = iterscan(s, idx=end, context=context).next()
except StopIteration:
raise ValueError(errmsg("Expecting object", s, end))
pairs[key] = value
@@ -164,9 +165,10 @@ def JSONArray(match, context, _w=WHITESPACE.match):
nextchar = s[end:end + 1]
if nextchar == ']':
return values, end + 1
+ iterscan = JSONScanner.iterscan
while True:
try:
- value, end = JSONScanner.iterscan(s, idx=end).next()
+ value, end = iterscan(s, idx=end, context=context).next()
except StopIteration:
raise ValueError(errmsg("Expecting object", s, end))
values.append(value)