From 695302ce9214405e166ef559bdd8abb5fceaa020 Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Tue, 30 Jan 2007 22:34:15 +0000 Subject: 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 --- django/utils/simplejson/decoder.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'django/utils/simplejson/decoder.py') 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) -- cgit v1.3