diff mod_json_streams/README.wiki @ 1782:29f3d6b7ad16

Import wiki pages
author Kim Alvefur <zash@zash.se>
date Mon, 24 Aug 2015 16:43:56 +0200
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mod_json_streams/README.wiki	Mon Aug 24 16:43:56 2015 +0200
@@ -0,0 +1,38 @@
+#summary JSON Encodings for XMPP
+#labels Stage-Beta
+
+= Introduction =
+
+This plugin encodes XMPP as JSON. This is an implementation of [http://xmpp.org/extensions/xep-0295.html XEP-0295: JSON Encodings for XMPP].
+
+Simply loading this module makes Prosody accept JSON on C2S streams (legacy XML clients are still supported).
+
+For BOSH, it requires mod_bosh be loaded, and JSON should be directed at the `/jsonstreams` HTTP path.
+
+JSON for S2S isn't supported due to the lack of a discovery mechanism, so we have left that disabled to stay compatible with legacy XML servers.
+
+= Configuration =
+Just add `"json_streams"` in your config's global `modules_enabled` list, for example:
+
+{{{
+modules_enabled = {
+	...
+	"json_streams";
+}
+}}}
+
+= Strophe.js plugin =
+We also developed a [http://prosody-modules.googlecode.com/hg/mod_json_streams/strophe.jsonstreams.js JSON streams plugin] for the popular [http://code.stanziq.com/strophe strophe.js] library.
+
+Just include it like this after including the strophe library, and your strophe-based client will be speaking JSON:
+{{{
+<script type="text/javascript" src="strophe.jsonstreams.js"></script>
+}}}
+Be sure to set the HTTP path to `/jsonstreams`. No other changes are required.
+
+= Compatibility =
+||0.8||Works||
+||trunk||Works||
+
+= Quirks =
+ * This plugin does not currently work with Prosody's [http://prosody.im/doc/port_multiplexing port multiplexing] feature