Skip to content

Fix: JSON deserialiser #66

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

Closed
wants to merge 2 commits into from
Closed

Fix: JSON deserialiser #66

wants to merge 2 commits into from

Conversation

punit-kulal
Copy link
Contributor

@punit-kulal punit-kulal commented Aug 21, 2023

Bug: json message isn't correctly serialised, even when published in protobuf compliant JSON format.

Context:

  1. Protobuf style guide states that JSON keys should be in camelCase, and protobuf keys/field names should be in snake_case.
  2. Thus, when a Request Payload is serialised. It uses CamelCase.
  3. However, since raccoon uses standard encoding/json package to deserialise, it does not correctly deserialise camelCase keys of Json.

Fix:

  1. Start using protobuf's official encoding/protojson package for deserialisation.
  2. It adhere's to the style guide of protobuf, which supports deserialisation of both snake_case and camelCase keys in JSON.

@punit-kulal
Copy link
Contributor Author

Closing due to large scope and backward incompatibility. Refer

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.

1 participant