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

Message#to_json should convert field names to lowerCamelCase #408

Closed
aslakhellesoy opened this issue Dec 10, 2019 · 1 comment
Closed

Message#to_json should convert field names to lowerCamelCase #408

aslakhellesoy opened this issue Dec 10, 2019 · 1 comment

Comments

@aslakhellesoy
Copy link

According to the Protobuf 3 language guide:

By default proto3 JSON printer should convert the field name to lowerCamelCase and use that as the JSON name.

I know this library isn't currently targetting Proto 3, but is this something you'd be open to a PR for? Backwards compatibility could be maintained by making this an opt-in feature. For example:

json = message.to_json(lower_camel_case: true)
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

No branches or pull requests

2 participants