A crate for generating transport agnostic, auto serializing, strongly typed JSON-RPC 2.0 clients.
This crate mainly provides a macro, jsonrpc_client. The macro generates structs that can be
used for calling JSON-RPC 2.0 APIs. The macro lets you list methods on the struct with
arguments and a return type. The macro then generates a struct which will automatically
serialize the arguments, send the request and deserialize the response into the target type.
Transports
The jsonrpc-client-core crate itself and the structs generated by the jsonrpc_client macro
are transport agnostic. They can use any type implementing the Transport trait.
The main (and so far only) transport implementation is the Hyper based HTTP implementation
in the jsonrpc-client-http crate.
Example
extern crate jsonrpc_client_core;
extern crate jsonrpc_client_http;
use HttpTransport;
jsonrpc_client!;