AnsweredAssumed Answered

How do I get this JSON into a pyhton list or dictionary?

Question asked by geonb_bernie on Apr 12, 2015
Latest reply on Apr 13, 2015 by geonb_bernie

Please help.  I'm new to Python.  I am writing my first python script.  I have made good progress but I am having trouble handling the response from a the ArcGIS Server 10.2 REST API 'project' operation. Here is some code that will get a sample response:


import urllib

import json

urlstring = ',5319788.292&transformation=1841&transformForward=TRUE&f=json'

ro1 = urllib.urlopen(urlstring)

ro2 =

print ro2


The response looks like this:



   The web service response looks like a Python dictionary but When I save it in variable 'ro2' I get a string.  How do I read this response into a Python list or dictionary?  I need to extract the 'x' and 'y' values.  I am working in Python 2.6.5.


Thanks for the help,