#16850: Testsuite failing on JSON serialization
-------------------------------------+-------------------------------------
               Reporter:  Raphael    |          Owner:  nobody
  Hertzog <hertzog@…>                |         Status:  new
                   Type:  Bug        |      Component:  Core
              Milestone:             |  (Serialization)
                Version:  1.3        |       Severity:  Normal
             Resolution:             |       Keywords:
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |    Needs tests:  0
    Needs documentation:  0          |  Easy pickings:  0
Patch needs improvement:  0          |
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
Changes (by anonymous):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 It looks like the problem here is that Django expects that decimal objects
 will get converted to string (by its default method) instead of a JSON
 number. This change to the default options was made for usability reasons
 in simplejson 2.2.0, most people want decimals to get encoded as numbers
 even though there's a possible loss of precision if decoded on the other
 end without the right options. This behavior can be turned back off with
 use_decimal=False on encode. The version embedded in Django also supports
 this option (default False rather than True), so explicitly specifying
 this behavior would be compatible with whichever version of dump/dumps
 ends up getting used.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16850#comment:1>
Django <https://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.

Reply via email to