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

DomainObjectSerializer API #18

Open
beikov opened this issue May 14, 2021 · 0 comments
Open

DomainObjectSerializer API #18

beikov opened this issue May 14, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@beikov
Copy link
Member

beikov commented May 14, 2021

The idea is to provide an API for serializing and deserializing domain objects to some format(csv, excel, json, xml, etc.). This is similar/related to expression serialization in blaze-expression, but in this case is only for domain objects. The serializer contract should offer methods for serializing a header and payload. The idea is that the header only needs to be serialized once and payload can be serialized multiple times afterwards into an existing context.

I have to think more about this, as we might move this to blaze-data. Not sure if it even makes sense to define the base contracts in blaze-domain.

The main driver for this is the serialization/deserialization for the excel format. The implementation should use a library like Apache POI. The domain model contains serialization metadata e.g. @ExcelColumn(index = 1, converter = SomeConverter.class) which is used to drive the serialization. The API should be capable to create a specialized serializer/deserializer for a domain type so that it can spin bytecode behind the scenes if wanted. The converter is very similar to the TypeAdapter contract in blaze-expression, so we might want to lift this contract into blaze-domain.

@beikov beikov added the enhancement New feature or request label May 14, 2021
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
Development

No branches or pull requests

1 participant