Choice of transports for JSON over TCP

前端 未结 5 1194
小鲜肉
小鲜肉 2020-12-24 03:16

I\'m writing a simple streaming JSON service. It consists of JSON messages, sent intermittently, for a long period of time (weeks or months).

What is the best pract

5条回答
  •  离开以前
    2020-12-24 04:08

    I've codified what I and some other developers are doing:

    http://en.wikipedia.org/wiki/Line_Delimited_JSON

    It has the advantage of being netcat/telnet compatible.

    See also: http://ndjson.org/

提交回复
热议问题