Merge into_json_deserialize into into_json.

This commit is contained in:
Jacob Hoffman-Andrews
2020-11-21 15:47:49 -08:00
parent 4cb856196e
commit 271e650662
4 changed files with 43 additions and 50 deletions

View File

@@ -75,7 +75,7 @@ fn body_as_json() {
)
});
let resp = get("test://host/body_as_json").call().unwrap();
let json = resp.into_json().unwrap();
let json: serde_json::Value = resp.into_json().unwrap();
assert_eq!(json["hello"], "world");
}
@@ -98,7 +98,7 @@ fn body_as_json_deserialize() {
)
});
let resp = get("test://host/body_as_json_deserialize").call().unwrap();
let json = resp.into_json_deserialize::<Hello>().unwrap();
let json: Hello = resp.into_json().unwrap();
assert_eq!(json.hello, "world");
}