Add a comment to explain Serialize on FacetValue is implemented by hand

This commit is contained in:
Clément Renault 2021-01-27 16:31:57 +01:00
parent b41bf58658
commit b6e91291fb
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4

View File

@ -38,6 +38,8 @@ impl From<i64> 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<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where