What Is JSON?
This is intended as a simple guide to JSON.
The more programming you do the more you hear about the data format "JSON".
However I've never actually used it until the changes to ASP.NET in vNext encouraged me to use it, basically the old XML format of the Web.Config is out and JSON is in (though you can swap back if I recall correctly).
What's In A Name?
JSON stands for "JavaScript Object Notation".
JavaScript Objects
The origin for this name is clear when you consider JavaScript objects. JavaScript objects are effectively dictionaries of key value pairs.
For those of you not familiar with a dictionary, the concept of JavaScript objects is as follows.
Let's describe your house:
var yourHouse = {
number : 25,
numberOfWindows : 20,
name : "Honeysuckle Cottage",
dog : new Dog(),
openDoor : function() {
alert("Hello!");
}
};
Now this isn't the best way to express a JavaScript Object with methods (or at all for that matter) but it expresses that JS objects are just collections of names for things and their values.