Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
json_macros
[] (https://travis-ci.org/tomjakubowski/json_macros)
let properties = json! ;
let menu_value = properties.find_path
.map;
assert_eq!;
Use JSON-like literals in Rust to construct serde_json
Value
s
or rustc-serialize
Json
values.
Because json_macros
is a compiler plugin, it's only compatible with
the Rust nightly channel.
Depending on your project's needs, you may ask json_macros
to
generate code that constructs serde_json
values or code that
constructs rustc-serialize
values.
Using json_macros with rustc-serialize
By default, json_macros
generates code for rustc-serialize
. In a
future release, the default may switch to serde_json
, but
json_macros
should be at least optionally compatible with
rustc-serialize
for as long as that crate is supported.
To use json_macros
with rustc-serialize
, add both packages as
dependencies to your Cargo.toml
.
[]
= "^0.3"
= "^0.3"
Your crate will also need to link with rustc_serialize
and use
it
in any submodule that uses the json!()
macro.
extern crate rustc_serialize;
// ...
Example
extern crate rustc_serialize;
Using json_macros with serde_json
To use json_macros
with serde_json
, add both packages as
dependencies to your Cargo.toml
. Enable the with-serde_json
feature for json_macros
and disable the default features so as to
not depend on rustc-serialize
.
[]
= "^0.3"
[]
= "^0.3"
= false
= ["with-serde"]
Your crate will also need to link with serde_json
and use
it in
any submodule that uses the json!()
macro.
extern crate serde_json;
// ...
Example
extern crate serde_json;