[
https://issues.apache.org/jira/browse/FELIX-5332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15464738#comment-15464738
]
David Bosschaert commented on FELIX-5332:
-----------------------------------------
Hi [~dleangen], thanks for this. I can't say I fully digested your code just
yet but I was wondering... To me, the serializer/schematizer sounds a bit like
a special Codec to me. For example if you used it with XML it could produce an
XML schema as part of the serialization and then do the deserialization
together with the schema.
It would be nice if the codec (or other API) could be such that it would
support such implementations.
To produce a schema, this might just be done as a by-product of the encoding
process? Maybe additionally configured via ConfigAdmin configuration factories?
Do we need anything extra in the codec API for this?
For decoding the story is probably different, as you need to be able to pass in
the schema as context of the decode operation. This could potentially be done
via configadmin too, but that would be awkward I think. Maybe if we add a
method to the Decoding interface to provide context/schema it might be useful,
so you could do
mySpecialCodec.decode(sometextfile).withSchema(mySchema).to(MyDTO.class)
Just an idea. I think it would be great if we could make the API such that
special implementations like your schema-based one work within the general
API...
> Serializer
> ----------
>
> Key: FELIX-5332
> URL: https://issues.apache.org/jira/browse/FELIX-5332
> Project: Felix
> Issue Type: New Feature
> Components: Converter
> Reporter: David Leangen
> Attachments: diff-serializer.txt
>
>
> Test case and a bit of code to show how a Serializer could work.
> To work as a Serializer, the type information needs to be embedded into the
> output.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)