Thread overview
Any library with support JSON-RPC for D?
Aug 11, 2013
ilya-stromberg
Aug 11, 2013
Dicebot
Aug 11, 2013
ilya-stromberg
Aug 11, 2013
Dicebot
August 11, 2013
Hi,

Do you know any library with support JSON-RPC for D?

Thanks.
August 11, 2013
On Sunday, 11 August 2013 at 08:51:19 UTC, ilya-stromberg wrote:
> Hi,
>
> Do you know any library with support JSON-RPC for D?
>
> Thanks.

Don't know about direct JSON-RPC implementation, but using vibe.http.rest from vibed.org allows for something similar - JSON-based RPC over HTTP.
August 11, 2013
On Sunday, 11 August 2013 at 16:06:42 UTC, Dicebot wrote:
> On Sunday, 11 August 2013 at 08:51:19 UTC, ilya-stromberg wrote:
>> Hi,
>>
>> Do you know any library with support JSON-RPC for D?
>>
>> Thanks.
>
> Don't know about direct JSON-RPC implementation, but using vibe.http.rest from vibed.org allows for something similar - JSON-based RPC over HTTP.

Can you print any code example, please? Or just link to the documentation?
August 11, 2013
On Sunday, 11 August 2013 at 17:01:32 UTC, ilya-stromberg wrote:
> Can you print any code example, please? Or just link to the documentation?

There is a REST example packaged with vibe.d: https://github.com/rejectedsoftware/vibe.d/blob/master/examples/rest/source/app.d

As you may notice, it uses the very same interface declaration for both `registerRestInterface` on server and `RestInterfaceClient`. In example they are run within same program but same can be done for two separate binaries, resulting in, essentially, RPC for that interface methods with all D data types (de)serialized using JSON behind the scene.