toastdriven/django-tastypie — pull request #535 by maraujop (2012-06-19 11:01:02+00:00)
Title: Django dev JSONSerializer is now based on json

Djando dev breaks Tastypie serialization. Tastypie uses Django `json.JSONEncoder`, which was based on simplejson in previous versions, but it's now based on json, which doesn't accept a keyword argument
`namedtuple_as_object` anymore.

This raises this runtime error:
```
__init__() got an unexpected keyword argument 'namedtuple_as_object'
```

So in Django 1.5 we need to pass `JSONEncoder` to json, instead of simplejson.

See my comments on the commit in Django that introduced this change:
https://github.com/django/django/commit/cec6bd5a59547dc97fe98975c570fc27a1e970be#django-core-serializers-json-py-P46

I'm not sure if this should be fixed in Django or Tastypie, meanwhile we can have Tastypie working with latest Django dev version with this patch.

Cheers,
Miguel