Patterns for POJO serialization/deserialization

Hello,

Could someone share the patterns you are using to serialize and deserialize POJO when setting variables for the process?

I see by default Zeebe Java client serialize the objects as maps.