Open tqwewe opened 2 months ago
If I have a Value, how can I convert this to a type which implements serde::Deserialize?
Value
serde::Deserialize
Libraries like serde_json have to_value and from_value functions for this, but I don't see a way to do this currently with cbor4ii.
to_value
from_value
How should I do this? Am I required to serialize the value to a Vec<u8> and deserialize again?
Vec<u8>
We need to implement Deserializer trait for Value, which shouldn't be hard. but I don't have time to implement it in short term.
Deserializer
Welcome PR :)
If I have a
Value
, how can I convert this to a type which implementsserde::Deserialize
?Libraries like serde_json have
to_value
andfrom_value
functions for this, but I don't see a way to do this currently with cbor4ii.How should I do this? Am I required to serialize the value to a
Vec<u8>
and deserialize again?