JSONRequest Proposal

Douglas Crockford of Yahoo, a pioneer of JSON, presented “JSON: The X in Ajax” at The Ajax Experience Tuesday afternoon.

In the presentation, Douglas discussed his proposal for native support of a new JavaScript object named JSONRequest. The object would provide a simple API for issuing Ajax requests to exchange JSON data using the following methods:

var request = JSONRequest.post(url, data, callbackFn);
var request = JSONRequest.get(url, callbackFn);

Other key points about the proposed object included:

  • Requests are transmitted in order
  • Requests can have timeouts
  • Requests can be cancelled
  • Connections are in addition to the browser’s ordinary two connections per host

Douglas has published more information about his proposal. The object itself is also available for download.

source: ajaxian.com