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

Refactor handling of special JSON types #185

Merged
merged 1 commit into from
Nov 30, 2021

Conversation

garyp
Copy link
Collaborator

@garyp garyp commented Nov 24, 2021

Centralize all handling of protobuf messages that use a custom JSON representation into a new JsonMessageAdapter interface. This will make it easier to add types to the future without having to do lots of plumbing for each new type.

Note that this only includes protobuf messages that have a custom JSON representation but use the normal generated message in Kotlin. Protobuf messages that also use a custom type in Kotlin (namely, the *Value protobuf types that are converted to nullable primitive types in Kotlin) are not currently handled via JsonMessageAdapter.

@garyp garyp requested a review from rahulreddym November 24, 2021 16:44
@garyp garyp force-pushed the garyp/message-fullname branch from 4caab4f to 0a0b10f Compare November 24, 2021 16:47
Centralize all handling of protobuf messages that use a custom JSON
representation into a new `JsonMessageAdapter` interface. This will make
it easier to add types to the future without having to do lots of
plumbing for each new type.

Note that this only includes protobuf messages that have a custom JSON
representation but use the normal generated message in Kotlin. Protobuf
messages that also use a custom type in Kotlin (namely, the `*Value`
protobuf types that are converted to nullable primitive types in Kotlin)
are not currently handled via `JsonMessageAdapter`.
@garyp garyp force-pushed the garyp/json-special-types-refactor branch from e47c4c8 to 0a9ebf2 Compare November 24, 2021 16:47
Base automatically changed from garyp/message-fullname to master November 30, 2021 19:23
@garyp garyp merged commit 6225115 into master Nov 30, 2021
@garyp garyp deleted the garyp/json-special-types-refactor branch November 30, 2021 19:26
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.

2 participants