-
Notifications
You must be signed in to change notification settings - Fork 4
/
966.txt
46 lines (35 loc) · 1.95 KB
/
966.txt
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
36
37
38
39
40
41
42
43
44
45
46
[1] [CITE@en[JSON Streaming - Wikipedia, the free encyclopedia]]
([TIME[2015-03-21 21:13:36 +09:00]] 版)
<http://en.wikipedia.org/wiki/JSON_Streaming>
[FIG(quote)[
[FIGCAPTION[
[2] [CITE@en-US[Noggit, the JSON Streaming Parser - Solr 'n Stuff]]
([TIME[2015-03-29 20:05:30 +09:00]] 版)
<http://yonik.com/noggit-json-parser/>
]FIGCAPTION]
> Concatenated JSON Streaming
> Noggit can also handle multiple JSON values streamed over a single connection and simply catenated together. Primitive values should of course be separated by whitespace to avoid ambiguity.
> {first_object:10}
> '''[''''another array object'''']''''''[''''yet another object'''']'''
> {more:objects}{another:object}
> '''[''''who knows how many json values will be streamed by the writer...'''']'''
> 42
> "is this the end?"
]FIG]
[FIG(quote)[
[FIGCAPTION[
[3] [CITE[simple is better - JSON-RPC 2.0 Transport: Sockets]]
([[Roland Koebler]] 著, [TIME[2014-06-11 00:46:10 +09:00]] 版)
<http://www.simple-is-better.org/json-rpc/transport_sockets.html#pipelined-requests-responses-json-splitter>
]FIGCAPTION]
> It's also possible to use a single connection for several Requests/Responses without an additional encoding. Then, (a) a streaming JSON-decoder or (b) a streaming JSON-splitter is needed, which detects the end of a JSON-object/array. Then, several JSON-RPC Requests can simply be pipelined on a single connection.
> Streaming JSON-decoders seem to be rare, but a JSON-splitter which only detects the end of a JSON-object/array can easily be implemented (see below).
]FIG]
[FIG(quote)[
[FIGCAPTION[
[4] [CITE[simple is better - JSON-RPC 2.0 Transport: HTTP]]
([[Roland Koebler]] 著, [TIME[2014-06-11 00:46:10 +09:00]] 版)
<http://www.simple-is-better.org/json-rpc/transport_http.html>
]FIGCAPTION]
> high-performance servers MAY allow several concatenated JSON-RPC Requests in a single HTTP message by using e.g. a JSON-splitter, and MAY then return concatenated Responses.
]FIG]