Opened 9 years ago
Closed 9 years ago
#25468 closed New feature (fixed)
DjangoJSONEncoder should call unicode() on proxy strings.
Reported by: | Stavros Korokithakis | Owned by: | nobody |
---|---|---|---|
Component: | Core (Serialization) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
If one uses the translation framework to get a string to convert to JSON, the DjangoJSONEncoder will choke on it, as it won't try to reify it. It should check the object type and call unicode() on proxy objects instead.
Attachments (1)
Change History (5)
comment:1 by , 9 years ago
Component: | Uncategorized → Core (Serialization) |
---|---|
Triage Stage: | Unreviewed → Accepted |
Type: | Bug → New feature |
Version: | 1.8 → master |
by , 9 years ago
Attachment: | 25468.diff added |
---|
comment:2 by , 9 years ago
Has patch: | set |
---|
comment:3 by , 9 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
Note:
See TracTickets
for help on using tickets.
I have a local patch ready to fix that, waiting on https://github.com/django/django/pull/5365 to be merged first.