openethereum/util/src/from_json.rs
2016-02-03 14:51:45 +01:00

17 lines
294 B
Rust

//! Coversion from json.
use standard::*;
#[macro_export]
macro_rules! xjson {
( $x:expr ) => {
FromJson::from_json($x)
}
}
/// Trait allowing conversion from a JSON value.
pub trait FromJson {
/// Convert a JSON value to an instance of this type.
fn from_json(json: &Json) -> Self;
}