From e3c6740b1a4389d1d5b05f5a7563995bfd8a06fc Mon Sep 17 00:00:00 2001 From: JMARyA Date: Sun, 21 Jul 2024 03:13:51 +0200 Subject: [PATCH] serde --- src/model/reference.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/model/reference.rs b/src/model/reference.rs index 263af54..4074e0b 100644 --- a/src/model/reference.rs +++ b/src/model/reference.rs @@ -80,6 +80,12 @@ impl Validate for Reference { } } +impl Into for Reference { + fn into(self) -> serde_json::Value { + serde_json::Value::String(self.0) + } +} + /// A trait that allows you to get a reference to a `Model` pub trait Referencable { /// The name of this model's collection