Thomas Try:
>>> import simplejson >>> simplejson.loads('{"totalspace":243862.672,"freespace":94053.564}') {'freespace': 94053.563999999998, 'totalspace': 243862.67199999999} >>> Although cjson is a lot faster, you should have simplejson if you are using Django. Thanos On May 3, 12:33 pm, Thomas Allen <thomasmal...@gmail.com> wrote: > How can I parse a simple JSON object in Django? > > I would like to parse the response: {"totalspace": > 243862.672,"freespace":94053.564} > > django.core.serializers.deserialize('json', packet) seems to have > trouble parsing such a simple string. > > Thomas > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group > athttp://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.