My favorites | Sign in
Project Home Wiki Issues Source
Search
for
mod_json_streams  
JSON Encodings for XMPP
Stage-Beta
Updated Apr 1, 2011 by waqas20

Introduction

This plugin encodes XMPP as JSON. This is an implementation of 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 JSON streams plugin for the popular 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.8Works
trunkWorks

Quirks

Comment by michael....@gmail.com, Aug 5, 2011

Do you know that the XEP-0295 is an april fool?

Comment by project member waqas20, Aug 5, 2011

Yes, of course. Didn't you notice the module was published on April 1st? :)

Comment by michael....@gmail.com, Oct 3, 2011

:D no, didn't notice that. An aprils fool upon an aprils fool. Nice ;)


Sign in to add a comment
Powered by Google Project Hosting