I just want to throw this out there, in case anyone would like to get a look at what JSON data looks like. I tweaked the URL to the iTunes Music Store’s JSON feed so that it would only return 1 item, downloaded the response to a text file on my desktop, and then opened it in an online pretty printer (that I found through Google) to get an idea of what is being returned from the request.
So, tweak the URL:
Copy that into your Clipboard and open up Terminal. On the command line, change into your Desktop, and use curl to download the file, feeding it the URL from the Clipboard:
> cd Desktop > curl -o json_snippet.txt "http://itunes.apple.com/us/rss/topsongs/limit=1/json"
I then opened that in a text editor, copied the entire contents to the Clipboard, and launched Safari. I then opened up the following web page:
Once at that page, you can paste the contents of the Clipboard (the JSON text) and hit the button “Pretty Print JSON”. You’ll see the data printed out with readable indentation in your browser.