www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Any library with support JSON-RPC for D?

reply "ilya-stromberg" <ilya-stromberg-2009 yandex.ru> writes:
Hi,

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

Thanks.
Aug 11 2013
parent reply "Dicebot" <public dicebot.lv> writes:
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.
Aug 11 2013
parent reply "ilya-stromberg" <ilya-stromberg-2009 yandex.ru> writes:
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?
Aug 11 2013
parent "Dicebot" <public dicebot.lv> writes:
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.
Aug 11 2013