One Javascript technology being used alongside of AJAX is JSON: "Javascript Object Notation". Well-formed JSON amounts to a Javascript associative array literal:
{
org: 'http://www.JSON.org',
copyright: '(c)2005 JSON.org',
license: 'http://www.crockford.com/JSON/license.html'
}
Besides strings, a JSON block can contain numbers, and even ordered and associative array literals. Unfortunately the above block, as contents of a file, would be inaccessible to HTML-embedded Javascript via the script tag's "src" attribute. The solution recommended on json.org is to use eval(), e.g.:
var myObject = eval('(' + aJSONtext + ')');
This is needlessly slow and insecure. If instead an identifier, which server-side parsers could simply ignore, were optionally prepended to the object literal block, then JSON could become not just another data exchange format, but a tool for "declarative" client-server web programming. To that end I propose a new standard, JSON++.