-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathmessages-encoding.json
More file actions
35 lines (35 loc) · 1.04 KB
/
messages-encoding.json
File metadata and controls
35 lines (35 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
"_messages": "/* Encoded message payloads that every client library should 1. send via raw POST and receive correctly decoded via a realtime channel instance and 2. send that again via realtime and check that it's encoded the same as here (e. g. via GET history) */",
"messages": [
{
"data": "foo",
"encoding": null,
"expectedType": "string",
"expectedValue": "foo"
},
{
"data": "{\"foo\":42}",
"encoding": null,
"expectedType": "string",
"expectedValue": "{\"foo\":42}"
},
{
"data": "{\"foo\":42,\"bar\":[\"a\",1.2,{\"boo\":\"ha\"}]}",
"encoding": "json",
"expectedType": "jsonObject",
"expectedValue": { "foo": 42, "bar": ["a", 1.2, { "boo": "ha" }] }
},
{
"data": "[{\"foo\":42},\"qux\"]",
"encoding": "json",
"expectedType": "jsonArray",
"expectedValue": [{ "foo": 42 }, "qux"]
},
{
"data": "3q2+7w==",
"encoding": "base64",
"expectedType": "binary",
"expectedHexValue": "deadbeef"
}
]
}