Rudimentary support for sending JSONRPC 1.0 requests and receiving responses.
This library is based on rust-jsonrpc.
This includes a of macro to enable serialization/deserialization of structures without using stable or nightly. They can be used as follows: ```rust
extern crate serde;
struct MyStruct {
elem1: bool,
elem2: String,
elem3: Vec
There is also a variant of this for enums representing structures that might have one of a few possible forms. For example ```rust struct Variant1 { success: bool, success_message: String }
struct Variant2 {
success: bool,
errors: Vec
enum Reply { Good(Variant1), Bad(Variant2) } serdestructenumimpl!(Reply, Good, Variant1, success, successmessage; Bad, Variant2, success, errors ); ``` Note that this macro works by returning the first variant for which all fields are present. This means that if one variant is a superset of another, the larger one should be given first to the macro to prevent the smaller from always being matched.
To send a request which should retrieve the above structure, consider the following example code
```rust
extern crate serde;
struct MyStruct {
elem1: bool,
elem2: String,
elem3: Vec
serdestructimpl!(MyStruct, elem1, elem2, elem3);
fn main() {
// The two Nones are for user/pass for authentication
let mut client = jsonrpc::client::Client::new("example.org", None, None);
let request = client.buildrequest("getmystruct", vec![]);
match client.sendrequest(&request).andthen(|res| res.intoresult::
```