[ https://issues.apache.org/jira/browse/FELIX-5332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15467168#comment-15467168 ]
David Leangen commented on FELIX-5332: -------------------------------------- [~bosschaert], in your example above, you suggest: {code} mySpecialCodec.decode(sometextfile).withSchema(mySchema).to(MyDTO.class) {code} Do you think we should make Schema a public interface, so mySchema is a Schema object? Or should Schema be "hidden" in the implementation, so mySchema is the name of the Schema, and the Schema object is private to the implementation? If Schema is public, we would need to update the API to include both the Schema and Node interfaces. Is that ok? I think that would be clearer, and therefore preferable, but I don't know how much flexibility you have with regards to API changes. BTW, I believe that the above would actually be: {code} mySpecialCodec.decode(sometextfile).to(mySchema) {code} or maybe {code} mySpecialCodec.decode(sometextfile).with(mySchema) {code} The reason is because including both the Schema *and* the target DTO is redundant, and could cause problems if there is a conflict between the two (i.e. the target DTO does not match the schema). > 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)