#36919: Allow `TaskResult` (and `Task`) to be pickled
-------------------------------------+-------------------------------------
Reporter: Jake Howard | Owner: Varun
Type: | Kasyap Pentamaraju
Cleanup/optimization | Status: assigned
Component: Tasks | Version: 6.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Jake Howard):
When you say custom objects, are you referring to `TaskContext`?
No. If you want to make any object JSON serializable, it needs a custom
`json.Encoder`. Unlike pickling, JSON encodability isn't a property of the
object itself. For example, for Django to have custom implemented support
for serializing `datetime`, it's done using a custom encoder, rather than
modifying the object itself. The concept you're after of "making an object
JSON serializable" simply doesn't exist.
Since JSON and pickle support are entirely different, implementing any
kind of support for it should be its own ticket anyway (not that it's
possible anyway).
--
Ticket URL: <https://code.djangoproject.com/ticket/36919#comment:11>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019ce67c036f-1bf0aaea-2f1c-4e89-b16e-ee56bd731d80-000000%40eu-central-1.amazonses.com.