diff --git a/test/test-helpers/src/roundtrip.rs b/test/test-helpers/src/roundtrip.rs
index 16a7a14..1a102f9 100644
--- a/test/test-helpers/src/roundtrip.rs
+++ b/test/test-helpers/src/roundtrip.rs
@@ -20,6 +20,16 @@ where
)
}
+pub fn json_value(a: A)
+where
+ for<'de> A: Clone + Debug + PartialEq + serde::Serialize + serde::Deserialize<'de>,
+{
+ assert_eq!(
+ a.clone(),
+ serde_json::from_value(serde_json::to_value(a).unwrap()).unwrap()
+ )
+}
+
pub fn cbor(a: A)
where
for<'de> A: Debug + PartialEq + minicbor::Encode + minicbor::Decode<'de>,