infiniticio / infinitic

Infinitic is an open source orchestration framework for application teams to build durable and flexible backend processes.
https://infinitic.io
Other
334 stars 21 forks source link

JsonView Support #245

Closed nseb closed 2 months ago

nseb commented 2 months ago

In Jackson, there is a JsonView feature, to have a different json format for the same object. In the case of infinitic, to integrate into an existing project, it would be interesting to support this functionality: https://www.baeldung.com/jackson-json-view-annotation

For example : In workflow , in meta a special meta name , json.view , can be set for select the correct json view desired , And Infinitic , if detected this special meta name , set the correct jsonview in the objectmapper.

geomagilles commented 2 months ago

I have some comments:

nseb commented 2 months ago

Hello @geomagilles

  1. Yes it's correct for serializer/deserialize

2 cf point 3 ,global for jsonview it's not the solution

3 Exact , Therefore for enable a jsonview , for example the client set in the meta map in the init workflow , a special attribute to set the correct jsonview value . As we would do with an annotation in spring at the controller level. And Infinitic can use this special meta attribute to enable or disable the correct view for serialize/deserialize

geomagilles commented 2 months ago

Fixed by b52c8a40bc9b9e3d68b38d1ee29b67bf6fa157cd