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 'serde-derive' feature #415

Closed
wants to merge 1 commit into from

Conversation

daladim
Copy link

@daladim daladim commented Dec 30, 2020

These changes add a way to have #[derive(serde::Serialize)] and #[derive(serde::Deserialize)] added to types from prost-types.

They may or may not be useful depending on the user needs, and they add a dependency, so they are gated behind a serde-derive feature.

This MR will conflict with #414 , but if you agree to merge both of them I can fix the conflicts if you want

@danburkert
Copy link
Collaborator

Hi @daladim, thanks for the PR. I agree with the motivation for this change, but unfortunately this implementation will not be able to land. The files you have modified are auto-generated (see bootstrap.rs). I would like to have a prost-build option that would result in the correct serde derive annotations being added to generated code. Critical to this is that the serde format be compatible with the protobuf json serialization rules. See #75 for the tracking issue.

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 this pull request may close these issues.

2 participants