feat: accept proto field name when deserializing#72
Merged
kodiakhq[bot] merged 1 commit intoinfluxdata:mainfrom Oct 4, 2022
Merged
feat: accept proto field name when deserializing#72kodiakhq[bot] merged 1 commit intoinfluxdata:mainfrom
kodiakhq[bot] merged 1 commit intoinfluxdata:mainfrom
Conversation
Contributor
Author
|
Alright. This is technically a corporate contribution, so I'll get in touch with my employer's legal team and get back to you with a ccla/icla |
For message fields, the proto3 json specification requires parsers to accept both lowerCamelCase names and the original proto field names. This change adapts the deserialization code-gen to accept the proto name.
8007490 to
a822422
Compare
Contributor
Author
|
Talked to legal, they cleared everything and I've signed the ICLA. I've also amended the commit to follow the semantic format |
rnarubin
added a commit
to rnarubin/pbjson
that referenced
this pull request
Oct 3, 2022
This change adds a flag to the code-gen builder, allowing output json fields to use their proto-schema defined field names instead of being converted to lowerCamelCase. Preserving proto field names is mentioned as an optional feature in the protobuf json specification[1]. This change builds on the previous support[2] for deserializing preserved proto field names. [1]: https://developers.google.com/protocol-buffers/docs/proto3#json_options [2]: influxdata#72
tustvold
approved these changes
Oct 4, 2022
rnarubin
added a commit
to rnarubin/pbjson
that referenced
this pull request
Oct 4, 2022
This change adds a flag to the code-gen builder, allowing output json fields to use their proto-schema defined field names instead of being converted to lowerCamelCase. Preserving proto field names is mentioned as an optional feature in the protobuf json specification[1]. This change builds on the previous support[2] for deserializing preserved proto field names. [1]: https://developers.google.com/protocol-buffers/docs/proto3#json_options [2]: influxdata#72
rnarubin
added a commit
to rnarubin/pbjson
that referenced
this pull request
Oct 18, 2022
This change adds a flag to the code-gen builder, allowing output json fields to use their proto-schema defined field names instead of being converted to lowerCamelCase. Preserving proto field names is mentioned as an optional feature in the protobuf json specification[1]. This change builds on the previous support[2] for deserializing preserved proto field names. [1]: https://developers.google.com/protocol-buffers/docs/proto3#json_options [2]: influxdata#72
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For message fields, the proto3 json specification requires parsers to accept both lowerCamelCase names and the original proto field names.
This change adapts the deserialization code-gen to accept the proto name.