fn to_value(value: &impl Serialize) -> Value
Serializes a match, or returns an empty object if it can’t be serialized.