You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google App Engine
I am getting a json string from an iphone application that is
consuming a google app engine application.
Can anybody let me know how to iterate over a json string using a
dictionary so that I can extract individual fields of the string
Thanks
Arnieterm
Pranav Prakash
unread,
May 5, 2009, 11:36:25 PM5/5/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google App Engine
You need to use a JSON library for Python. Here is a good one that i
have found, and using for quite sometime.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google App Engine
Arnie,
I'm assuming you want to iterate over the json in Python?
Once you get the json string converted to a Python dictionary using
simplejson, you can use the dictionary's iteritems() method to iterate
over it in a python forloop like so:
from django.utils import simplejson
#jsonStr is your json string in Python
#convert to dict using simplejson:
jsonAsDict = simplejson.loads( jsonStr )
#jsonAsDict is now a python dict object
for i in jsonAsDict.iteritems():
i[0] #is the key
i[1] #is the value
Hope that helps.
Brandon
unread,
May 6, 2009, 10:09:45 AM5/6/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message