aboutsummaryrefslogtreecommitdiff
path: root/test-suite
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2018-08-06 10:17:30 -0500
committerGitHub <noreply@github.com>2018-08-06 10:17:30 -0500
commit8181a7e645064426b43891b0f4c7fa86c2a2d154 (patch)
treeb08ac7fbe55ab74731c838f90dc6fd36a6f14f58 /test-suite
parent7c1da18505c5773cfb3653790976ab18837e9feb (diff)
parentbc726bb0426dc4a54d6b9f4281bbd98b826bc625 (diff)
downloadmilf-rs-8181a7e645064426b43891b0f4c7fa86c2a2d154.tar.gz
milf-rs-8181a7e645064426b43891b0f4c7fa86c2a2d154.zip
Merge pull request #255 from kornelski/master
Support deserializing from other integer types
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/tests/serde.rs13
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();
+}