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

Provide a way to "finalize" deserializaton #998

Closed
RReverser opened this issue Jul 24, 2017 · 2 comments
Closed

Provide a way to "finalize" deserializaton #998

RReverser opened this issue Jul 24, 2017 · 2 comments

Comments

@RReverser
Copy link

Sometimes, you can describe the structure almost perfectly in struct with just derive(Deserialize), but just need some extra steps to "finalize" it depending on some fields etc..

When you are deserializing struct directly, it's possible to just add extra method for that, but when it's part of other derive(Deserialize) items, it becomes less convenient, and you have to reimplement Deserialize completely or write deserialize_with everywhere.

It would be nice if serde would provide such hook for "finalization" in the core.

@dtolnay
Copy link
Member

dtolnay commented Jul 24, 2017

Thanks! We are tracking this in #642.

@dtolnay dtolnay closed this as completed Jul 24, 2017
@RReverser
Copy link
Author

Oh, sorry, missed it.

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

No branches or pull requests

2 participants