Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deserialize Value into T: Deserialize #33

Open
tqwewe opened this issue Sep 3, 2024 · 1 comment
Open

Deserialize Value into T: Deserialize #33

tqwewe opened this issue Sep 3, 2024 · 1 comment

Comments

@tqwewe
Copy link

tqwewe commented Sep 3, 2024

If I have a Value, how can I convert this to a type which implements 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.

How should I do this? Am I required to serialize the value to a Vec<u8> and deserialize again?

@quininer
Copy link
Owner

quininer commented Sep 4, 2024

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.

Welcome PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants