For those of you who like jQuery but cannot find any sensible way of interacting with JSON (Java Object Notation), here is a solution for you.
I come up with this solution while developing several GNUCITIZEN application, including the latest XSSDB and Backframe. You can get the code from over here, although this might not be the latest version as I am constantly modifying the script and including it in different kind of projects.
In order to call JSON you have to do the following:
$.json('http://path/to/json?callback={callback}', function yourFunction () {
[your code here]
});
As you can see, everything is very jQuery like so you shouldn’t have any problems.
http://docs.jquery.com/Ajax#.2.....llback_.29
?