[Gllug] OT: Anyone know Jquery & JSON ?

Progga proggaprogga at gmail.com
Tue Nov 9 09:47:26 UTC 2010


On Tue, Nov 9, 2010 at 7:31 AM, general_email at technicalbloke.com
<general_email at technicalbloke.com> wrote:
>
> Now I didn't really expect jQuery to just use raw JSON, but I did assume
> it would use something simple and fairly universal like standard HTTP
> URL encoding or base64 encoding to serialize the JSON so it would sit
> nicely within HTTPs URL format.

Here is what the jQuery manual [0] says:
  "Data that is sent to the server is appended to the URL as a query
string. If the value of the data parameter is an object (map), it is
converted to a string and url-encoded before it is appended to the
URL."

So it is indeed URL encoded.  I have never tried it, but my guess is
in your Python code you need to first decode the json qeury parameter
and then pass it through json.loads()


[0] http://api.jquery.com/jQuery.getJSON/
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list