You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes I want to work with a Value that I know to be a json object. Map<String, Value> is the correct type to use for this but it is not possible to deserialize from a Map<String, Value> to a more concrete without going through Value. It would be nice if Map<String, Value> implemented Deserializer so this all just works.
My actual use case is that I have a &Map<String, Value> that I would like to deserialize to a concrete struct, which is harder to come up with a workaround for. With an owned value I could just do T::deserialize(Value::Object(map)) but that doesn't work for a reference.
The text was updated successfully, but these errors were encountered:
Sometimes I want to work with a
Value
that I know to be a json object.Map<String, Value>
is the correct type to use for this but it is not possible to deserialize from aMap<String, Value>
to a more concrete without going throughValue
. It would be nice ifMap<String, Value>
implementedDeserializer
so this all just works.My actual use case is that I have a
&Map<String, Value>
that I would like to deserialize to a concrete struct, which is harder to come up with a workaround for. With an owned value I could just doT::deserialize(Value::Object(map))
but that doesn't work for a reference.The text was updated successfully, but these errors were encountered: