-
Notifications
You must be signed in to change notification settings - Fork 382
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
serde support #266
Comments
I think two thoughts:
|
I think deriving Hiding this behind a feature would be fine tough. |
This would indeed be nice as an optional feature! |
Actually now I think that probably it's possible to have it always on. E. g. generated files could be like this:
So users who need serde could simply enable flag, and codegen flag won't be needed. However! I believe JSON serialization and parsing should be done without serde (because it can be done better/more protobuf standard conforming than serde). I've almost finished reflection in protobuf (now protobuf reflection can mutate messages, not just read), and I plan to implement JSON parsing/serialization in protobuf soon. |
Three additions.
|
The current state of serde support:
This API design is not final. Feedback is welcome! |
Published version 2.1.0. |
I think
serde_json
is a useful feature. If it's opened, the generated code should be like:So that we can parse
{"a": 100}
to the struct directly.Current status:
Bytes
The text was updated successfully, but these errors were encountered: