From b6e91291fbf7227f087e5e041f68f31108f3d124 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Wed, 27 Jan 2021 16:31:57 +0100 Subject: [PATCH] Add a comment to explain Serialize on FacetValue is implemented by hand --- src/facet/facet_value.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/facet/facet_value.rs b/src/facet/facet_value.rs index 9630c6634..f311ca3dd 100644 --- a/src/facet/facet_value.rs +++ b/src/facet/facet_value.rs @@ -38,6 +38,8 @@ impl From for FacetValue { } } +/// We implement Serialize ourselves because we need to always serialize it as a string, +/// JSON object keys must be strings not numbers. impl Serialize for FacetValue { fn serialize(&self, serializer: S) -> Result where