Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify (de)serializer declarations #27

Closed
yuanchen233 opened this issue Apr 10, 2024 · 3 comments · Fixed by #99 or #123
Closed

Unify (de)serializer declarations #27

yuanchen233 opened this issue Apr 10, 2024 · 3 comments · Fixed by #99 or #123
Assignees
Labels
enhancement New feature or request

Comments

@yuanchen233
Copy link
Collaborator

yuanchen233 commented Apr 10, 2024

Every CORE application service has its own serializer and deserializer which we use in ObjectMapperConfig, but that doesn’t necessarily have to be like that; we can create a generic serializer factory that gets an input type on call, which is the type of object it serializes (or some other solution)

The objective is to not have to create a new serializer/deserializer instance every time there is a new object added to core, but instead where we could just declare the type and that’s it.


We will use the Kotlin serializers

@yuanchen233 yuanchen233 self-assigned this Apr 10, 2024
@yuanchen233 yuanchen233 added the enhancement New feature or request label Apr 10, 2024
@yuanchen233 yuanchen233 linked a pull request Aug 7, 2024 that will close this issue
@yuanchen233 yuanchen233 linked a pull request Aug 28, 2024 that will close this issue
@davidscavnicky
Copy link
Contributor

This approach solves multiple issues with size of the code base. (repetitive code, same functionality described for classes ..)

@bardram
Copy link
Collaborator

bardram commented Sep 4, 2024

Almost done - Needs documentation

@yuanchen233
Copy link
Collaborator Author

All serialization involving core is using Kotlinx.serialization now, with one exception: datastreams,
datastream is saved in database as snapshots, which is not related to core Snapshot.

Some Portal specific endpoint with webservice data type is still using Jackson serializer, this will be fine as long as there is no core data type involved. However, if we want to configure Spring to use kotlinx.serialization by default, all those type need to be annotated with Serializable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants