diff options
author | Kornel <kornel@geekhood.net> | 2018-08-06 15:23:32 +0100 |
---|---|---|
committer | Kornel <kornel@geekhood.net> | 2018-08-06 15:23:32 +0100 |
commit | bc726bb0426dc4a54d6b9f4281bbd98b826bc625 (patch) | |
tree | a9323a450b419617938f61addc3b192fa3568d3e | |
parent | de6b59fb12c5ad51d94831893536f09fcd29ee8b (diff) | |
download | milf-rs-bc726bb0426dc4a54d6b9f4281bbd98b826bc625.tar.gz milf-rs-bc726bb0426dc4a54d6b9f4281bbd98b826bc625.zip |
Test serde_json interoperability
-rw-r--r-- | test-suite/tests/serde.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test-suite/tests/serde.rs b/test-suite/tests/serde.rs index 446cd7a..b97937f 100644 --- a/test-suite/tests/serde.rs +++ b/test-suite/tests/serde.rs @@ -1,4 +1,5 @@ extern crate serde; +extern crate serde_json; extern crate toml; #[macro_use] extern crate serde_derive; @@ -589,3 +590,15 @@ fn fixed_size_array() { assert_eq!(value, expected); assert_eq!(toml::to_string(&value).unwrap(), text); } + +#[test] +fn json_interoperability() { + #[derive(Serialize, Deserialize)] + struct Foo { + any: toml::Value + } + + let _foo: Foo = serde_json::from_str(r#" + {"any":1} + "#).unwrap(); +} |