felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Bosschaert (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-5332) Serializer
Date Wed, 21 Sep 2016 10:45:20 GMT

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

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

Hi [~dleangen], there is no rush at all - as a separate module this can evolve using its own
timeline :)

The idea of 'withContext(Object obj)' is to use that in place of what you proposed initially
as with(Schema x) but then a little more generic. This would just provide a way to provide
the (de)serializer with extra context, which could be a schema, but might also be something
other implementation specific. It would not tie the Serializer API to whatever the context
is, and implementations can choose to supply whatever they want, including a Schema object.

As a suggested starting point I have added the withContext() to the Serializer and Deserializer
APIs. By default they do nothing (as not all serializers need this context), but implementations
can use these to get the Schema... Do you think this might work? It's just an idea...


> Serializer
> ----------
>
>                 Key: FELIX-5332
>                 URL: https://issues.apache.org/jira/browse/FELIX-5332
>             Project: Felix
>          Issue Type: New Feature
>          Components: Converter
>            Reporter: David Leangen
>            Assignee: David Bosschaert
>         Attachments: patch.diff
>
>
> 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)

Mime
View raw message