[ 
https://issues.apache.org/jira/browse/FELIX-5332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15435136#comment-15435136
 ] 

David Bosschaert commented on FELIX-5332:
-----------------------------------------

Hi [~dleangen], I just reopened the issue since you are thinking of 
experimenting more :)

Couple of thoughts from my side...

Regarding configuration of these things. I personally still think a Codec may 
play a role here (but am happy to be proved wrong). On the configuration side 
of it, maybe we can use a factory configuration with ConfigAdmin where you can 
specify alternative instances of the codec and look them up via a custom 
mime-type, e.g. for your one with extra metadata you could define your own mime 
type: x-application/json+metadata or something like that. Then you'd have 
multiple service instances available at runtime and you'd use the one that you 
want where you want it, so no single global configuration... I will play a bit 
with this idea and try to work it out.

Just another thought on looking up the classes on the deserialization side. 
Class.forName("classname") is probably not what you want to do because that 
will not work if this class is provided by a bundle in your system. It might be 
better to include the Bundle SymbolicName and version in the metadata, then you 
can look up this bundle when reconstructing the object and load the required 
class directly from it...

Looking forward to your experiments :)

David

> 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)

Reply via email to