Skip to content

Implement Deserializer<'_> / IntoDeserializer for Value<'_> #10

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

Closed
A-Manning opened this issue Oct 10, 2023 · 3 comments · Fixed by #22
Closed

Implement Deserializer<'_> / IntoDeserializer for Value<'_> #10

A-Manning opened this issue Oct 10, 2023 · 3 comments · Fixed by #22

Comments

@A-Manning
Copy link

Would it be possible to implement serde::Deserializer<'ctx> / serde::de::IntoDeserializer for serde_json_borrow::Value<'ctx>?

serde_json_borrow::Value is often useful as an intermediate value when deserializing, and so it would be nice to be able to deserialize from a serde_json_borrow::Value in the same way that one can from a serde_json::Value. Note that serde_json::Value implements serde::Deserializer and serde::de::IntoDeserializer, and serde_json also provides the helpful serde_json::from_value function to deserialize from a serde_json::Value.

@PSeitz
Copy link
Owner

PSeitz commented May 20, 2024

Sorry for the late reply.
I think that would be a good addition to reach feature parity. I would accept an PR for that.

And just as a heads up, I consider removing the limitation that keys in objects are not allowed to have any JSON escaping characters. (maybe as a feature flag)

@ssddOnTop
Copy link
Contributor

And just as a heads up, I consider removing the limitation that keys in objects are not allowed to have any JSON escaping characters. (maybe as a feature flag)

can you give an example of some failing case

@PSeitz
Copy link
Owner

PSeitz commented Oct 28, 2024

released with 0.7.0

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

Successfully merging a pull request may close this issue.

3 participants