JSON
My interest in JSON is two-fold, the association with AJAX and the fact that I was getting a JSON error when I was downloading a report or statement from a website that I use. I cannot remember what site at the moment.
The file was doLogin.json and it contained {"redirect":"summary.html"} - so I think it was what I thought above. Probably a programming error on the site I was downloading it from.
What json.org say:
Data Structures:
Quite frankly, when I looked at the pages on json.org and Douglas' site I was a little intimidated by the diagrams. on more introspection I am not sure how it could have been done differently. The structure of a JSON file can take many forms but there is a specification on how they are formatted.
For example, the first definition on json.org:
An example of this:
var books = [
{
"title": "Cracking the coding interview",
"subtitle":"189 programming questions and solutions",
"author":"Gayle Laakmann McDowell",
"category":"Programming",
"publisher":"CareerCup, LLC"
},
{
"title": "No friend but the mountains",
"subtitle":"Writing from manu prison",
"author":"Behrouz Boochani",
"category":"Literature",
"publisher":"Pan Macmillan Australia"
},
.............................. more data ]
The example data above is from my page on a search page of a list of books that is built as a JSON Object.