#3324: FloatFields are converted to decimal and simplejson cannot serialize
------------------------------+---------------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: jacob
Status: reopened | Component: Serialization
Version: SVN | Resolution:
Keywords: json decimal | Stage: Ready for checkin
Has_patch: 1 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
------------------------------+---------------------------------------------
Comment (by Jorge Gajon <[EMAIL PROTECTED]>):
I was thinking that maybe it is not very efficient to check the presence
of the Decimal library every time the encoding is called. It probably
would be better to move this part to the top level of the module so that
it is executed once (at module import).
{{{
decimal_available = False
try:
import decimal
decimal_available = True
except:
# decimal is not included in Python 2.3
pass
}}}
I'm not uploading another attachment to avoid more clutter, and because I
also would like to hear opinions :)
Thanks!
--
Ticket URL: <http://code.djangoproject.com/ticket/3324#comment:12>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---