Hello list,
I (
Basile Starynkevitch) am the main developer of
GCC MELT a plugin and lispy domain specific language -translated to C++ suitable inside GCC- to customize and extend the
GCC compiler. (Both MELT and GCC are free software
GPLv3 licensed, FSF copyrighted).
I am adding JSONRPC2 client abilities to MELT. The main motivation would be to communicate with the future MELT monitor (a server providing a web interface and persistency to MELT; this is work in progress, pre-alpha stage, see
melt-monitor -also GPLv3 free software on github).
(I'm not willing to use existing implementations, first to avoid an additional dependencies, and mostly because MELT has its own garbage collector and runtime system).
However, JSONRPC2 abilities are useful on their own , and I believe some people might be happy to use MELT new JSONRPC2 client abilities to some other external JSONRPC2 server.
I want to avoid HTTP transport, because in practice that would require depending on some additional HTTP client library
So I have several questions related to JSONRPC2 (I am a newbie on that subject), after reading
http://www.simple-is-better.org/json-rpc/extension_transport.html . Of course, I'm mostly interested by GPLv3 compatible free software implementations running on Linux.
- In the JSONRPC protocol, I guess that the order of field in JSON objects is not signficant. So an implementation can send (on the client side)
{"jsonrpc": "2.0", "method": "sum", "params": [3, 4], "id": "1"}but it could also send
{"id":"1","jsonrpc":"2.0","method":"sum","params":[3,4]}is this correct? Likewise is the order of fields in the reply significant? I believe that no!
- Are there any server implementation using Unix (technically AF_UNIX) sockets?
- Are there any implementation of JSONRPC2 on sockets using JSON splitting?
- I understand that JSON splitting means putting several JSON objects immediately one after the other without any spaces between closing brace and next request opening brace, e.g.
{"jsonrpc":"2.0","method":"sum","params":[3,4],"id":"1"}{"jsonrpc":"2.0","method":"sum","params":[5,6],"id":"2"}
which I am trying to implement but which suprises me. I would find easier if the specification said that the client MUST put at least one space between them.
- can a JSONRPC2 server implementation insert a newline at the end of each reply JSON object? (in a JSON splitting implementation) My understanding is that yes?
- Is it sensible (at least as an extension) to enable JSONRPC in both directions once a socket connection is established?
Thanks for reading. Regards.
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***