Making JSON serialization work for Celery.