Author: mtredinnick
Date: 2007-05-21 18:26:36 -0500 (Mon, 21 May 2007)
New Revision: 5311

Modified:
   django/trunk/django/core/serializers/json.py
Log:
Removed some cruft left over from fixing problems in the move to DecimalField
([5302]).


Modified: django/trunk/django/core/serializers/json.py
===================================================================
--- django/trunk/django/core/serializers/json.py        2007-05-21 23:24:06 UTC 
(rev 5310)
+++ django/trunk/django/core/serializers/json.py        2007-05-21 23:26:36 UTC 
(rev 5311)
@@ -35,7 +35,6 @@
         stream = StringIO(stream_or_string)
     else:
         stream = stream_or_string
-    #for obj in PythonDeserializer(simplejson.load(stream, 
cls=DjangoJSONDecoder)):
     for obj in PythonDeserializer(simplejson.load(stream)):
         yield obj
 
@@ -62,25 +61,3 @@
 # Older, deprecated class name (for backwards compatibility purposes).
 DateTimeAwareJSONEncoder = DjangoJSONEncoder
 
-## Our override for simplejson.JSONNumber, because we want to use decimals in
-## preference to floats (we can convert decimal -> float when they stored, if
-## needed, but cannot go the other way).
-#def DjangoNumber(match, context):
-#    match = DjangoNumber.regex.match(match.string, *match.span())
-#    integer, frac, exp = match.groups()
-#    if exp:
-#        res = float(integer + (frac or '') + (exp or ''))
-#    elif frac:
-#        res = decimal.Decimal(integer + frac)
-#    else:
-#        res = int(integer)
-#    return res, None
-#decoder.pattern(r'(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]?\d+)?')(DjangoNumber)
-#
-#converters = decoder.ANYTHING[:]
-#converters[-1] = DjangoNumber
-#decoder.JSONScanner = decoder.Scanner(converters)
-#
-#class DjangoJSONDecoder(simplejson.JSONDecoder):
-#    _scanner = decoder.Scanner(converters)
-#


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to