[Standards] Proposed XMPP Extension: JSON Content Type support

Matthew A. Miller linuxwolf at outer-planes.net
Wed Apr 27 21:47:54 UTC 2011

On Apr 20, 2011, at 09:35 , XMPP Extensions Editor wrote:

> The XMPP Extensions Editor has received a proposal for a new XEP.
> Title: JSON Content Type support
> Abstract: This specification defines JavaScript Object Notation (JSON) use in XMPP service.
> URL: http://www.xmpp.org/extensions/inbox/json.html
> The XMPP Council will decide at its next meeting whether to accept this proposal as an official XEP.

The Council has decided to reject the proposal at this time.  There most significant problems are:

1) The syntax is underspecified, and listed in a traditionally non-normative section (Implementation Notes).  As Mr. Cridland noted previously, "$" and "$$" are never explicitly defined.

2) (also noted by Mr. Cridland) The format does not properly handle namespaces; it deals with XML's syntax and not the semantics.  For instance:

	<ns:tag attr="attr-value">txt-value</tag>

is malformed (without knowledge of its ancestors), and the fact this specification translated to:

	{ "tag" : {
	  "$$" : "ns",
	  "attr" : "attr-value",
	  "$" : "txt-value" }

makes proper handling of namespaced data, and therefore XMPP, about as difficult as dealing with DOMs (if not more so).

3) (also noted by Mr. Cridland) The format does not meet the second requirement in the specification: "JSON stanza must contain (or retain) all XMPP stanza content and hierarchy."

I fail to see how to encode the following, retaining the semantic meaning:

<message xmlns='jabber:client' from='juliet at capulet.net/balcony' to='romeo at montegue.net/garden' type='chat'>
  <body>Romeo, Romeo! wherefor art thou, Romeo?</body>
  <html xmlns='http://jabber.org/protocol/xhtml-im'>
    <body xmlns='http://www.w3.org/1999/xhtml'>
      <p>Romeo, <span style='font-weight: bold'>Romeo</span>! wherefor art thou, <span style='font-style: italic'>Romeo</span>!</p>
  <active xmlns='http://jabber.org/protocol/chatstate'/>

This proposal looks about as complete as one posited in the XML.com article <http://www.xml.com/pub/a/2006/05/31/converting-between-xml-and-json.html>.  The article explicitly listed #3 as a failing.

- m&m
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2238 bytes
Desc: not available
URL: <http://mail.jabber.org/pipermail/standards/attachments/20110427/19f632ca/attachment.bin>

More information about the Standards mailing list