Re: Serializing non-queryset data

2010-07-07 Thread Jonathan Hayward
Never mind; I found: import json def view(request): ... my_result = ... return HttpResponse(json.dumps(my_result), mimetype="application/json") On Wed, Jul 7, 2010 at 6:05 PM, Jonathan Hayward < christos.jonathan.hayw...@gmail.com> wrote: > I just tried: > > json_serializer.serializ

Serializing non-queryset data

2010-07-07 Thread Jonathan Hayward
I just tried: json_serializer.serialize(result, ensure_ascii = False, stream = response) where result was boolean. I got an error complaining that it was not iterable, and http://docs.djangoproject.com/en/dev/topics/serialization/seems to discuss serialization of querysets. In this case I can ea