An up-and-coming lightweight data interchange format for Web applications, considered by a growing number of people to be an alternative to XML, has gotten a boost from the standards body Ecma.
This inclusion "will certainly have a big impact on developers," said Douglas Crockford, the Yahoo software architect cited as the creator of JSON.
"JSON is already pretty widely-used in Web applications. By having JSON built into the ECMAScript language, [JSON] implementations will get faster and safer," Crockford said.
The approval is also a sign that the Web application development community is edging away from using XML as the sole desired standard for exchanging data among disparate systems, in at least those cases where delivery of relatively simple structured data is required.
The new standard, officially entitled ECMA-262, includes an object for both creating and parsing JSON texts. For the most part, it follows the 2006 Internet Engineering Task Force RFC 4627 authored by Crockford.
The new ECMAScript standard attempts to rectify a number of security issues surrounding JSON.
Over the past several years, a growing number of Web application developers used JSON instead of XML-based approaches, like the Simple Object Access Protocol, to mark up data so it can be transferred between two computers. This created two sometimes-opposing camps within the Web application development community.
"The split between the JSON and XML advocates is strong and will continue for the foreseeable future," said Daniel Markham, an Ajax architect and principal partner of the Virginia-based consulting firm Bedford Technology Group.
In contrast, XML relies on schema-based markup tags, which tend to make the datasets larger and more complex than those typically rendered in JSON.
Markham also noted that XML has a flexibility that JSON can't match. "XML remains the Swiss Army knife of the Internet: able to handle all sorts of data from any connector," he said.
Since its creation in 2001, JSON has grown in popularity. The JSON.org site lists a number JSON converters for languages such as Perl, Active Server Pages, PHP, C, Java, Python and others. Yahoo supports JSON for its Web services.
The latest versions of Internet Explorer and Firefox both have JSON support. JSON "looks like it will be the first bit of ECMAScript 5 that will be rolled out universally," Crockford said.
JSON itself has always been a part of ECMAScript, at least insofar as Crockford used ECMAScript grammar as the basis for JSON. The difference with ECMAScript 5, Crockford noted, is that ECMAScript has "built-in library support" for JSON. This will help in matters of security.
Tim Bray, a co-creator of the XML format and director of Web technologies at Sun Microsystems, noted that XML practitioners he has worked with see the value of JSON.
"XML has a bunch of features which make it possible to interchange documents (blog pieces, news releases, medical records), and these can be superfluous for interchanging pure data," he noted by e-mail. "JSON works really well for interchanging that kind of stuff and, like XML, is nicely vendor-independent."
Bray doubts the ECMA blessing will have much impact on further JSON adoption though, since it is already widely used and doesn't suffer from the interoperability problems that standards usually address.
"Obviously, there's no harm in the ECMAScript [revision] recognizing the reality of JSON [but] JSON is already deeply implanted in Web IT culture."