google / google/gson

Encrypt some annotated fields

Open
#1,230 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
24.2k
Forks
4.5k
Avg merge
6d 4h
Merged PRs (30d)
12

Description

Hello,
I have some fields annotated with a custom annotation @MyId. It can be applied to single elements (int, strings...) or collections.
My final target is to translate this fields using a custom component (in a web page, I have the key in the session) and I just would like to do this during the JSON serialization.

I cannot find any way to achieve this using GSON (I don't want to write a full custom serializer for each possibile response my backend will send, of course), can you help me?

Thanks
Andrea

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.