JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate.
Example of using JSON in JavaScript:
var object = {};
var serializedObject = '{"helloworld" : "hi"}'; //json string
//set an object from a json serialized object
function deserializeObject
{
object = eval("(" + serializedObject + ")");
}
function serializeObject
{
return object.toSource(); //It wont work in IE.
}