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

JSON parser uses field's name as-is, even when it's in snake_case #5

Open
vasyafromrussia opened this issue Apr 8, 2020 · 0 comments · May be fixed by #6
Open

JSON parser uses field's name as-is, even when it's in snake_case #5

vasyafromrussia opened this issue Apr 8, 2020 · 0 comments · May be fixed by #6

Comments

@vasyafromrussia
Copy link

vasyafromrussia commented Apr 8, 2020

proto3 spec says:

By default proto3 JSON printer should convert the field name to lowerCamelCase and use that as the JSON name. An implementation may provide an option to use proto field name as the JSON name instead. Proto3 JSON parsers are required to accept both the converted lowerCamelCase name and the proto field name.

However, generated data classes use snake case json keys, and there's no way to configure this behaviour. I.e. if my service is implemented respectively to specs, I cannot parse service's responses.

I suppose, json names must be converted to camel case in generated client.

@vasyafromrussia vasyafromrussia linked a pull request Apr 8, 2020 that will close this 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 a pull request may close this issue.

1 participant