Software /
code /
prosody-modules
Comparison
mod_json_streams/README.md @ 6003:fe081789f7b5
All community modules: Unify file extention of Markdown files to .md
author | Menel <menel@snikket.de> |
---|---|
date | Tue, 22 Oct 2024 10:26:01 +0200 |
parent | 1803:mod_json_streams/README.markdown@4d73a1a6ba68 |
comparison
equal
deleted
inserted
replaced
6002:5a65a632d5b9 | 6003:fe081789f7b5 |
---|---|
1 --- | |
2 labels: | |
3 - 'Stage-Beta' | |
4 summary: JSON Encodings for XMPP | |
5 ... | |
6 | |
7 Introduction | |
8 ============ | |
9 | |
10 This plugin encodes XMPP as JSON. This is an implementation of | |
11 [XEP-0295: JSON Encodings for | |
12 XMPP](http://xmpp.org/extensions/xep-0295.html). | |
13 | |
14 Simply loading this module makes Prosody accept JSON on C2S streams | |
15 (legacy XML clients are still supported). | |
16 | |
17 For BOSH, it requires mod\_bosh be loaded, and JSON should be directed | |
18 at the `/jsonstreams` HTTP path. | |
19 | |
20 JSON for S2S isn't supported due to the lack of a discovery mechanism, | |
21 so we have left that disabled to stay compatible with legacy XML | |
22 servers. | |
23 | |
24 Configuration | |
25 ============= | |
26 | |
27 Just add `"json_streams"` in your config's global `modules_enabled` | |
28 list, for example: | |
29 | |
30 modules_enabled = { | |
31 ... | |
32 "json_streams"; | |
33 } | |
34 | |
35 Strophe.js plugin | |
36 ================= | |
37 | |
38 We also developed a [JSON streams | |
39 plugin](http://prosody-modules.googlecode.com/hg/mod_json_streams/strophe.jsonstreams.js) | |
40 for the popular [strophe.js](http://code.stanziq.com/strophe) library. | |
41 | |
42 Just include it like this after including the strophe library, and your | |
43 strophe-based client will be speaking JSON: | |
44 | |
45 <script type="text/javascript" src="strophe.jsonstreams.js"></script> | |
46 | |
47 Be sure to set the HTTP path to `/jsonstreams`. No other changes are | |
48 required. | |
49 | |
50 Compatibility | |
51 ============= | |
52 | |
53 ------- ------- | |
54 0.8 Works | |
55 trunk Works | |
56 ------- ------- | |
57 | |
58 Quirks | |
59 ====== | |
60 | |
61 - This plugin does not currently work with Prosody's [port | |
62 multiplexing](http://prosody.im/doc/port_multiplexing) feature |