Speeding Up AJAX with JSON
Is JSON Fast and Reliable?
Of course, you might not always have control of the server-side that's producing data for your AJAX application. You might be using a third-party server for your data and it's possible that server provides only XML output. And, if it happens to provide JSON, are you sure you really want to use it?
JSON on the Server Side
So far, you've been focusing on using JSON in AJAX-based Web applications running in the client browser. Naturally, there has to be something in the Web server to produce that JSON in the first place. Luckily, creating JSON or "stringifying" it from existing data structures is fairly straightforward. Certain Web application frameworks, such as TurboGears, automatically include support for JSON output. JSON stringifiers exist for several languages as well.
In addition, commercial Web services providers are taking note of JSON. Yahoo recently made many of their Web services JSON-enabled. Yahoo's various search services, travel planners, del.icio.us, and highway traffic services all support JSON output. Doubtless, other major Web services providers will jump on the JSON bandwagon.
About the Author
Sean Kelly is a fan of Greek mythology and comedy and appreciates the vast potential for puns in both AJAX and JSON. His own team of AJAX-led Argonauts are ready to tackle whatever tasks you might need to face in Web applications, Python, AJAX, Java, Web services, and even the most loathsome XML. He consults to the medical, aerospace, and digital media industries, but does yoga daily and is enormously flexible to whatever your application might be.
He resides in an undisclosed location with his wife Mary and daughter Ariana, who are routinely annoyed by his home automation hobby.
Page 2, of 2