I have a python FastCGI server which accepts POST from client, I want to use JSON as the format to communicate between the client and server, but it really confuse me how it works.
The JSON representation in javascript is:
{'login_user': {'username':username, 'password':password}}
When I post this JSON object, the jquery will re-encode it to dict and convert it to string, encode it and send it out:
login_user[username] = "kajjd"&loginuser[password] = "kdjfdj" #it's unescaped query string
My python server will receive this string. I also want to use JSON in the server side, what I can do to convert this query string back to JSON in python? Is it any fast way?
I don't know my usage of JSON is good way, but I can't see any good side of JSON, why not XML? I am asking myself.