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

Add a "Discard" type #643

Closed
mitsuhiko opened this issue Dec 19, 2016 · 4 comments
Closed

Add a "Discard" type #643

mitsuhiko opened this issue Dec 19, 2016 · 4 comments
Labels

Comments

@mitsuhiko
Copy link
Contributor

I'm currently encountering the issue that I want to selectively discard data of maps. Effectively I have a deeply nested JSON structure and at one point all I care about is the keys of a map but not the values. So ideally one could use something like a serde::Discard as a stand-in that's implemented similarly to serde_json::Value but completely discards all values while still parsing correctly.

@oli-obk
Copy link
Member

oli-obk commented Dec 19, 2016

this could also just be a helper function for deserialize_with #553

@dtolnay
Copy link
Member

dtolnay commented Dec 19, 2016

This exists as serde::de::impls::IgnoredAny.

@dtolnay
Copy link
Member

dtolnay commented Dec 21, 2016

Closing because I see you used IgnoredAny in getsentry/rust-sourcemap@a665671.

@dtolnay dtolnay closed this as completed Dec 21, 2016
@mitsuhiko
Copy link
Contributor Author

Sorry yeah, forgot to reply to this. Completely missed it in the docs. Thanks!

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

No branches or pull requests

3 participants