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