Integrate Custom changes in GSON before convert to JSON

24 views
Skip to first unread message

jay harkhani

unread,
Jul 2, 2019, 3:01:05 AM7/2/19
to google-gson
We have requirement in project where we need to apply encryption algorithm while convert POJO to JSON. Currently we have added custom logic in ReflectiveTypeAdapterFactory class of GSON jar. It's final class so we can extend it. 

We have already work with register Custom Adapter by extends TypeAdpater. But in this scenario we need to register for each class. Is there any way to implement custom changes before convert POJO to JSON for large no. of classes or default adapter which apply to all?

GSON Version: 2.8.5
Reply all
Reply to author
Forward
0 new messages