Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] My first JSON object



Darren, Godwin, Simon, Fredric, TLUG,

Thank you for the advice.

I'm sold on the idea that I should use JQuery to handle all the fine print of JSON handling. However, I'm just a little fuzzy on how to use JQuery for this.

Most of the examples I've looked at on the web use an additional Javascript file called json2.js, available from json.org. This doesn't seem to be a plug in for JQuery, but a separate (?) set of code for working with JSON, but I don't quite get what it does.

Does JQuery not natively support JSON...?

Beyond that, I just want to make sure I've got the code right.

Assuming I have JQuery and json2.js loaded, I think to send JSON data to the server, I use this code:

$.getJSON("http://myserver.com/jsonhandler.php";, myJSONvariable, function(returnedJSON){});

Will that send the data contained in myJSONvariable to jsonhandler.php, and then store the response from the server in a variable called returnedJSON?

Thank you for all your help.

--
Dave M G


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links