0

I am currently looking for a JSON-RPC library that implements the 2.0 specification and is, or at least can be easily adapted to be, transport-agnostic, implemented in c++ and have as few dependencies as possible.

In my search for it, I already looked for on the obvious places and the more comprehensive collections below:

Header-only / standard c++11 implementation, for a quick drop in a new project, that can be used on different platforms is a plus!

Please note that I am not looking for a recommendation on which one is best or not, as I can most likely judge that myself. What I am asking is if anybody else know about a library that meet those technical requirements above, or at least already found a way to work around those requirements using an implementation that is public available.

Thank you.

tstark81
  • 478
  • 3
  • 13
  • The question was down-voted on the "recommend a library" ground. Keep in mind I am not asking for a general library recommendation purely on opinion. I am exposing some technical requirements and asking specifically for knowledge taking that in consideration. – tstark81 Sep 12 '15 at 15:58
  • I use [minijson](https://giacomodrago.github.io/minijson/) for JSON and implement the JSONRPC bit myself, it's extremely simple – M.M Sep 13 '15 at 23:07

1 Answers1

4

After a lot of digging, the closest I could find that meet those requirement, specifically the one to be able to be adapted to be transport-agnostic was:

https://github.com/erijo/xsonrpc

It is still not a header-only implementation, and it has some external dependencies that makes it cumbersome to compile/use on different platforms and projects, but it was still the closest one I could find.

I might adapt this one to make it 100% in compliance with the original requirements of my question. Will update the question when I do so.


UPDATE

Using xsonrpc as a starting point, I put together an implementation that satisfy all those requirements and published as an opensource project:

https://github.com/uskr/jsonrpc-lean - include-only, transport-agnostic JSON-RPC 2.0 client/server implementation

tstark81
  • 478
  • 3
  • 13