Moreover, If you intend to use JSON on Google App Engine with django,
simplejson is the only choice. No extra C libraries.

Viet.

On Tue, May 4, 2010 at 12:47 AM, thanos <than...@gmail.com> wrote:

> 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<django-users%2bunsubscr...@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<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
I submit to you that if a man hasn't discovered something he will die for,
he isn't fit to live.
(Martin Luther King Jr.)
-----

-- 
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.

Reply via email to