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

feature: add GSON module #448

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

torrespro
Copy link

Based on the conversation here (#218) and in our implementation in a internal project I added the Gson Module to the project just in case we want to have an initial support to maybe extend in the future.
It's quite simple just 2 annotations for now, in our project actually the module it's just a class in our code not a full new dependency but maybe in some other context and if more functionality is added a module would make more sense.

@torrespro torrespro mentioned this pull request May 27, 2024
Copy link
Member

@CarstenWickner CarstenWickner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @torrespro,

Thanks for creating the new module.
I appreciate your taking the time to put it in all the right places. 😄
Which makes me somewhat torn here.

For completeness' sake, we'd have to add it to the Maven plugin too and then keep dragging the whole gson library around with us everywhere.
I'm not a big fan of the latter, especially if we only do all this for the sake of two simple configurations that were already mentioned on the old issue.
I don't like to discard the effort you've put in already, but my current preference would be to merely add this as an example and/or in the documentation, but not add it to the list of maintained modules.

Or do you foresee any other (more complex) additions to the GsonModule that would make this worthwhile?
Or is there another (more lightweight) dependency containing only the relevant annotations?
As-is, it seems overkill to me.

@matusfaro
Copy link

If this becomes officially supported, I'd love to contribute as well.

So far I stumbled upon another case which I fixed for myself: this doesn't cover @SerializedName annotation present on enums. We'd need Jackson's CustomEnumDefinitionProvider for gson as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants