I'm making the jump from PHP and MySQL to Python and Google App Engine, and it's a bit different from what I'm used to. For now, I'm just trying to find out the basics of a server request.
From my client (an iPhone), I send a dictionary in JSON format with a HTTP request (it's set as the POST value).
How do I get this dictionary in Python? In PHP, I would do:
$dictionary=json_decode(stripslashes($_POST["dictionary"]));What's the Python equivalent?
Then say I run some queries, and I want to send a JSON string back to my client as a response. How would I do this in Python? Is it just self.response.out.write()? What would I put in the parenthesis to send a JSON representation of the Python dictionary?