On Thu, May 5, 2011 at 4:01 PM, Mridul Muralidharan <[email protected]> wrote: >> Abstract: This specification defines JavaScript Object Notation (JSON) >> use in XMPP service. >> >> URL: http://www.xmpp.org/extensions/inbox/json.html
The JSON representation suggested here is incorrect: it doesn't preserve the order of nodes. <a>1</a><b>2</b> is different from <b>2</b><a>1</a>. A major benefit of JSON is simplicity, but there would be none of that simplicity here: it just takes the XML schema's complexity and translates it directly into JSON. JSON formats are often much easier to deal with, not just in JavaScript but in all languages, because they map nicely to language concepts--but it wouldn't have that advantage here. Namespaces also defeat the advantage of mapping children by name. You don't look up "message" to find messages, after all; you need to match items with a name of "message" and a namespace of "jabber:client". -- Glenn Maynard
