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

Support more message kinds as parameter types #152

Open
torkelrogstad opened this issue Jan 5, 2025 · 1 comment
Open

Support more message kinds as parameter types #152

torkelrogstad opened this issue Jan 5, 2025 · 1 comment

Comments

@torkelrogstad
Copy link
Contributor

Based on my reading of isWKTWithScalarJSONMapping and its usage, it seems like the only messages that's supported for parameters are primitive wrappers and google.protobuf universe. Would be great to also support more types from the google.type universe. I'm interested in using google.type.Date, at least.

@emcfarlane
Copy link
Collaborator

Hey @torkelrogstad you are correct, currently there is no custom formatting for JSON types (see this related issue that asks for google.type.Date). The parameter mapping uses the proto JSON representation and is restricted to these subset of types. Adding custom formats would have to be done with a custom JSONCodec. It would need to alter the methods MarshalAppendField and UnmarshalField to handle the date type marshalling. Hope that helps!

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