#12845: JSON serialization of empty query set raises "cannot serialize" error.
---------------------------+------------------------------------------------
 Reporter:  orokusaki      |       Owner:  nobody    
   Status:  new            |   Milestone:            
Component:  Serialization  |     Version:  SVN       
 Keywords:                 |       Stage:  Unreviewed
Has_patch:  0              |  
---------------------------+------------------------------------------------
 If I try to use

 {{{
 json.dumps({'items': myitemqueryset})
 }}}

 and the query set is empty, a serialization error comes up with the not-
 so-helpful message that [] cannot be serialized. In fact [] can be
 serialized. I take it that an empty queryset's __repr__ returns [], but
 behaves differently than a normal empty list.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/12845>
Django <http://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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to