On 05/06/2011 07:45 AM, Helander Mika (Nokia-SDX/Oulu) wrote: Hi,
> My target was to create ease to use way to "talk" XMPP with JSON. Keep > amount of JavaScript as minimum required for XMPP. Have server-side > implementation also fairly simple with little or no overhead compared to > XML parsing. This proposal was pushed down on my priority list, but it didn't fall of it. So here is my delayed reaction. The longer I think about it, the more the idea behind your approach fascinates me. It is interesting to not just use BOSH or XMPP to transmit a JSON payload, but to 'JSONize' XMPP and BOSH themselves too. In theory it can make the clients a lot lighter while all the goodies of XMPP stay available. Depending on your point of view, a drawback or an advantage of this proposal is that it renders the current javascript client codebase useless. I can see two other approaches that do require the client to parse XML, but that have their own advantages: - Using a bare BOSH connection without opening a XMPP stream to send JSON, so you have a real-time JSON connection. - Sending JSON as XMPP payload, so you can use the XMPP routing for routing the JSON. This proposal might have some additional value if it is accompanied by a XEP on how to encapsulate a JSON payload, both over a bare BOSH connection and as a message payload. And of course, these should be compatible with this proposal: then we can have best of both worlds. As noted by others here, the quality of the XML <-> JSON translation will determine how usable this will become. So that part really needs to be thought out well. Unfortunately I haven't enough experience with XML <-> JSON translations to judge how good this proposal is, but I do know that translation can be tricky. It might be wise to compare the chosen method with known approaches to it. Because the translation is so critical, it also might be wise to run example stanzas from other XEPs specs back and forth through the translator to see if they translate back to the same (or an equivalent). Overall I think your approach is innovative, but radical: it is re-basing XMPP itself from XML to JSON. When taking such a radical step, better make sure it is done well. best wishes, Winfried
