felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Bosschaert <david.bosscha...@gmail.com>
Subject Re: [Converter] Questions about RFP
Date Mon, 16 Jan 2017 16:17:34 GMT
Hi David,

On 11 January 2017 at 22:39, David Leangen <osgi@leangen.net> wrote:

>
> Hi!
>
> I have some questions about this document:
>
>  https://github.com/osgi/design/blob/master/rfps/rfp-
> 0169-Object-Conversion.pdf <https://github.com/osgi/
> design/blob/master/rfps/rfp-0169-Object-Conversion.pdf>
>
>
> First: 5.2 Maps, M0020: It must be possible to convert a DTO+ to a
> Map<String, Object> and vice versa
>
> Does this mean a “deep” conversion? I.e. any embedded objects will also be
> converted to a Map? Or embedded objects will be passed along “as is” and
> only the parent object is converted?
>

That's a good question. I think it should be a shallow conversion,
otherwise the behaviour becomes ambiguous. If the DTO field 'foo' contains
an instance of some other DTO, there is no issue with putting that object
in the map, since it's a Map<String, Object>. If the target is a
Map<String, String> the value of the other DTO would be converted to a
String first... Hope that makes sense...


>
> Second: D0040: Provide a way to set/get fields from a DTO+ through a
> string path
>
> Where is this located in the API? Is it possible that this and other
> requirements have been abandoned?
>
>
This requirement didn't make it in the spec. This is quite normal in OSGi.
Requirements are sometimes dropped or postponed if this agreed to in the
expert group.

Cheers,

David

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message