2016-02-01 14:58:13 +01:00
|
|
|
//! Coversion from json.
|
|
|
|
|
2016-01-14 21:24:16 +01:00
|
|
|
use standard::*;
|
|
|
|
|
|
|
|
#[macro_export]
|
|
|
|
macro_rules! xjson {
|
|
|
|
( $x:expr ) => {
|
|
|
|
FromJson::from_json($x)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-01-19 17:02:01 +01:00
|
|
|
/// TODO [Gav Wood] Please document me
|
2016-01-14 21:24:16 +01:00
|
|
|
pub trait FromJson {
|
2016-01-19 17:02:01 +01:00
|
|
|
/// TODO [Gav Wood] Please document me
|
2016-01-14 21:24:16 +01:00
|
|
|
fn from_json(json: &Json) -> Self;
|
|
|
|
}
|