Is it possible to register a custom TypeInfoFactory without using an annotation?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Is it possible to register a custom TypeInfoFactory without using an annotation?

杨力
I'd like to provide a custom serializer for a POJO class. But that class cannot be modified so it's not possible to add a @TypeInfo annotation to it. Are there any other ways to register one?
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to register a custom TypeInfoFactory without using an annotation?

Biao Liu
Hi,

Java supports customization of serializer/deserializer, see [1]. Could it satisfy your requirement?


Thanks,
Biao /'bɪ.aʊ/



On Mon, 26 Aug 2019 at 16:34, 杨力 <[hidden email]> wrote:
I'd like to provide a custom serializer for a POJO class. But that class cannot be modified so it's not possible to add a @TypeInfo annotation to it. Are there any other ways to register one?