3 ms·
JSON-RPC is text based https://en.wikipedia.org/wiki/JSON-RPC https://en.wikipedia.org/wiki/JSON-RPC
by CodeArtisan 8y ago
JSON-RPC is text based
https://en.wikipedia.org/wiki/JSON-RPC https://en.wikipedia.org/wiki/JSON-RPC
- coldtea 8y agoIt's a parsable format. Not some arbitrary stream of text, like what UNIX streams deal with...
- CodeArtisan 8y agoWhat do you mean by "arbitrary stream of text"? I fail to understand, to be honest. A text always need to be parsed, even a simple number, but the point is to deal with characters instead of raw binary data.
- coldtea 8y ago>What do you mean by "arbitrary stream of text"? I fail to understand, to be honest That it's structured and specific. UNIX pipes, for example, can deal with any kind of text -- it's up to the user to ensure that the commands (e.g. "cut -d," etc) work ok with them, whereas the JSON RPC communications of the language server are not only in a specific syntax (JSON), but they also have predetermined content schema.
- geezerjay 8y ago"arbitrary streams of text" are also parsed. Line breaks matter, whitespace matters as well, and in some cases tabs and spacea matter.
- coldtea 8y agoThere's a difference if I tell you: I will send you any kind of text at any time, it's your responsibility to deal with it and parse it accordingly to whatever it might be, than if I tell you, I'll send you JSON with this schema.