2 releases
Uses old Rust 2015
0.1.1 | Dec 12, 2015 |
---|---|
0.1.0 | Dec 7, 2015 |
#109 in #deprecated
Used in way-cooler
3KB
73 lines
json_macro
Macro for rust_serialize crate realized with standard macro_rule (no needs compiler features).
Dependencies
Add this to your Cargo.toml
:
[dependencies]
json_macro = "*"
and this to your crate root:
#[macro_use]
extern crate json_macro;
Usage
Use macro this way:
let s = json!("string");
let f = json!(3.1f64);
let a = json!([1,2,3,4,5]);
let o = json!({
"one" => 1,
"sub" => (json!({
"two" => 2
}))
});
Dependencies
~225KB