Make Response::into_json deserialize into a serde DeserializeOwned
This removes the necessity to take the result of Response::into_json and having to convert it into a struct by using serde_json::from_value This adds no new dependencies since serde_json already depends on serde. Users of ureq will have to include `serde_derive` either by importing it directly or by using serde with the `derive` feature, unless they want to manually implement `Deserialize` on their structs.
This commit is contained in:
committed by
Martin Algesten
parent
8f2d094cef
commit
0b69c595b6
@@ -10,8 +10,6 @@ use encoding::EncoderTrap;
|
||||
|
||||
#[cfg(feature = "json")]
|
||||
use super::SerdeValue;
|
||||
#[cfg(feature = "json")]
|
||||
use serde_json;
|
||||
|
||||
/// The different kinds of bodies to send.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user