From 6188a429510bb3476d17872ac54b959a4f3ba2c0 Mon Sep 17 00:00:00 2001 From: Peter Saint-Andre Date: Thu, 10 Oct 2013 16:46:39 -0600 Subject: [PATCH] 0.0.2 --- inbox/json-containers.xml | 41 ++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/inbox/json-containers.xml b/inbox/json-containers.xml index 47d900e2..921fe3ad 100644 --- a/inbox/json-containers.xml +++ b/inbox/json-containers.xml @@ -22,11 +22,18 @@ Council XMPP Core + RFC 4627 NOT_YET_ASSIGNED &mwild; + + 0.0.2 + 2013-10-09 + mw +

Update namespace to urn:xmpp:json:0, add requirement for encapsulation within other protocols, and require conformance to RFC 4627.

+
0.0.1 2012-11-15 @@ -40,27 +47,32 @@

This document aims to solve the problem by defining a standard way to embed JSON into any XMPP stanza, and even allowing its use with existing XMPP protocols where possible.

-

This specication should:

+

This specification should:

  • Allow stanza generators to unambiguously embed JSON within their stanzas.
  • Allow stanza recipients a way to identify JSON content, and thus also validation.
-

Since JSON generally isn't designed for end-user presentation, most use-cases centre around JSON as part of machine-to-machine communication, or as part of a higher protocol.

- - - { "name": "romeo", "age": "421", "status": "single" } - - +

Since JSON generally isn't designed for end-user presentation, most use-cases centre around JSON as part of machine-to-machine communication, or as part of a higher protocol, such as &xep0060;.

+ + + + + + { "name": "romeo", "age": "421", "status": "single" } + + + + + ]]> -

Outside of closed systems, it is much more desirable to place the JSON element within some greater context, for example as part of another protocol.

- - + { "name": "romeo" } @@ -69,8 +81,9 @@
-

The <json> element MUST only contain character data, and the data MUST conform to the JSON specification. Specifically, the element MUST NOT be empty, as the empty string is not valid JSON. The data MUST be encoded as UTF-8 (though officially unspecified, this is the de facto encoding for JSON today).

+

The <json> element MUST only contain character data, and the data MUST conform to &rfc4627;. Specifically, the element MUST NOT be empty, as the empty string is not valid JSON. The data MUST be encoded as UTF-8 (though officially unspecified, this is the de facto encoding for JSON today).

Implementations SHOULD validate JSON they receive and intend to use, and be prepared to handle invalid data appropriately (such as by responding to the sender with the applicable XMPP error reply for the stanza type).

+

As the <json> element alone provides no context to the recipient about the kind of data it contains, only the format, it SHOULD always be encapsulated within another element that provides a context and SHOULD NOT be added as a direct child of a stanza.

The JSON container element is intended for communicating small pieces of generic JSON data within a particular context. XMPP entities MUST NOT attempt to interpret unexpected JSON data they receive, and servers SHOULD NOT inspect JSON data inside stanzas they are routing, other than for OPTIONAL validation.

@@ -93,8 +106,8 @@