jQuery and JSON and Yahoo Pipes
Today I am working on a short workshop on using the jQuery framework. This is going to focus on using JSON together with jQuery to manipulate data. I am learning quite a bit of this as I go. Just a couple of items that I am encountering.
JSONP – This is JSON with padding, and it is supposed to make your stuff a little bit more secure. Here is a link to one of the earlier articles on JSONP. It looks to me like Yahoo Pipes is doing JSONP a little differently than Del.icio.us is doing JSONP.
$.getJSON() – This is the method called in jQuery to get JSON data. It was revamped recently to prevent cross-domain JSON requests. By magic, you can append “&_jsoncallback” to your JSON request URL and it works cross-domain.
My understanding about JSON and security is this. You can probably be okay if you just run the JSON literal through a regular expression to filter out nasty script characters. I’m assuming that jQuery’s $.getJSON() does this for you.
The further you go into the jQuery UI stuff the further you get into trouble with versions.