Add From<serde_json::Value> for Json
This commit is contained in:
parent
a8c7e571e4
commit
aa83cab31b
|
@ -37,6 +37,12 @@ impl<T: DeserializeOwned + Serialize + Send + Sync> ScalarType for Json<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl From<serde_json::Value> for Json<serde_json::Value> {
|
||||||
|
fn from(value: serde_json::Value) -> Self {
|
||||||
|
Self(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
use crate::*;
|
use crate::*;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user