JSON (JavaScript object notation) is an easy data exchange format. It’s easy for a person to read and write. Easy for machines to analyze and generate. It is based on a subset of the JavaScript programming language, Standard ECMA-262 3rd Edition - December 1999. JSON is a text format that is completely independent of the language, but uses conventions that are familiar to the programmers of the C-family of languages ... These properties make JSON an ideal data exchange language.
a source
JSON is a subset of JavaScript object literary notation. Since JSON is a subset of JavaScript, it can be used in a language without garbage or fuss.
var myJSONObject = {"bindings": [ {"ircEvent": "PRIVMSG", "method": "newURI", "regex": "^http://.*"}, {"ircEvent": "PRIVMSG", "method": "deleteURI", "regex": "^delete.*"}, {"ircEvent": "PRIVMSG", "method": "randomURI", "regex": "^random.*"} ] };
a source
However, to parse JSON from an external source or to serialize JSON objects from your own code, you will need a library such as JSON-js since Javascript / ECMAScript does not currently support this, though:
Native JSON support is expected to be included in the next ECMAScript standard.
source share